@latticexyz/common 2.2.22-bc1e7cb9cfb39fc8c81201b15f8f5528df778192 → 2.2.22-bc95ea094386f235971f1c5b98a34f41c161999d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chains.d.ts +7 -5
- package/dist/chunk-CHXZROA7.js +16 -0
- package/dist/chunk-CHXZROA7.js.map +1 -0
- package/dist/{chunk-ETXWXV5T.js → chunk-NFWCLD5I.js} +1 -14
- package/dist/chunk-NFWCLD5I.js.map +1 -0
- package/dist/codegen.js +2 -1
- package/dist/codegen.js.map +1 -1
- package/dist/internal.d.ts +2 -9
- package/dist/internal.js +2 -409
- package/dist/internal.js.map +1 -1
- package/dist/utils.js +4 -2
- package/package.json +3 -3
- package/dist/chunk-ETXWXV5T.js.map +0 -1
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/waitForTransactions.ts","../src/deploy/ensureContract.ts","../src/deploy/common.ts","../src/deploy/debug.ts","../src/deploy/ensureContractsDeployed.ts","../src/deploy/ensureDeployer.ts","../src/deploy/create2/deployment.json","../src/deploy/getDeployer.ts","../src/deploy/getContractAddress.ts","../src/transports/methods/estimateUserOperationGas.ts","../src/transports/entryPointSimulations.ts","../src/transports/methods/getUserOperationReceipt.ts","../src/transports/wiresaw.ts"],"sourcesContent":["import { Client, Transport, Chain, Account, Hex } from \"viem\";\nimport { debug } from \"./debug\";\nimport { waitForTransactionReceipt } from \"viem/actions\";\n\nexport async function waitForTransactions({\n client,\n hashes,\n debugLabel = \"transactions\",\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly hashes: readonly Hex[];\n readonly debugLabel?: string;\n}): Promise<void> {\n if (!hashes.length) return;\n\n debug(`waiting for ${debugLabel} to confirm`);\n // wait for each tx separately/serially, because parallelizing results in RPC errors\n for (const hash of hashes) {\n const receipt = await waitForTransactionReceipt(client, { hash });\n // TODO: handle user op failures?\n if (receipt.status === \"reverted\") {\n throw new Error(`Transaction reverted: ${hash}`);\n }\n }\n}\n","import { Client, Transport, Chain, Account, concatHex, getCreate2Address, Hex } from \"viem\";\nimport { getCode } from \"viem/actions\";\nimport { contractSizeLimit, singletonSalt } from \"./common\";\nimport { debug } from \"./debug\";\nimport { sendTransaction } from \"../sendTransaction\";\n\nexport type Contract = {\n bytecode: Hex;\n deployedBytecodeSize?: number;\n debugLabel?: string;\n salt?: Hex;\n};\n\nexport async function ensureContract({\n client,\n deployerAddress,\n bytecode,\n deployedBytecodeSize,\n debugLabel = \"contract\",\n salt = singletonSalt,\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly deployerAddress: Hex;\n} & Contract): Promise<readonly Hex[]> {\n if (bytecode.includes(\"__$\")) {\n throw new Error(`Found unlinked public library in ${debugLabel} bytecode`);\n }\n\n const address = getCreate2Address({ from: deployerAddress, salt, bytecode });\n\n const contractCode = await getCode(client, { address, blockTag: \"pending\" });\n if (contractCode) {\n debug(\"found\", debugLabel, \"at\", address);\n return [];\n }\n\n if (deployedBytecodeSize != null) {\n if (deployedBytecodeSize === 0) {\n throw new Error(`Empty bytecode for ${debugLabel}`);\n }\n\n if (deployedBytecodeSize > contractSizeLimit) {\n console.warn(\n `\\nBytecode for ${debugLabel} (${deployedBytecodeSize} bytes) is over the contract size limit (${contractSizeLimit} bytes). Run \\`forge build --sizes\\` for more info.\\n`,\n );\n } else if (deployedBytecodeSize > contractSizeLimit * 0.95) {\n console.warn(\n // eslint-disable-next-line max-len\n `\\nBytecode for ${debugLabel} (${deployedBytecodeSize} bytes) is almost over the contract size limit (${contractSizeLimit} bytes). Run \\`forge build --sizes\\` for more info.\\n`,\n );\n }\n }\n\n debug(\"deploying\", debugLabel, \"at\", address);\n return [\n await sendTransaction(client, {\n chain: client.chain ?? null,\n to: deployerAddress,\n data: concatHex([salt, bytecode]),\n }),\n ];\n}\n","import { stringToHex } from \"viem\";\n\n// salt for deterministic deploys of singleton contracts\nexport const singletonSalt = stringToHex(\"\", { size: 32 });\n\n// https://eips.ethereum.org/EIPS/eip-170\nexport const contractSizeLimit = parseInt(\"6000\", 16);\n","import { debug as parentDebug } from \"../debug\";\n\nexport const debug = parentDebug.extend(\"deploy\");\nexport const error = parentDebug.extend(\"deploy\");\n\n// Pipe debug output to stdout instead of stderr\ndebug.log = console.debug.bind(console);\n\n// Pipe error output to stderr\nerror.log = console.error.bind(console);\n","import { Client, Transport, Chain, Account, Hex } from \"viem\";\nimport { Contract, ensureContract } from \"./ensureContract\";\nimport { waitForTransactions } from \"../waitForTransactions\";\nimport { uniqueBy } from \"../utils/uniqueBy\";\n\nexport async function ensureContractsDeployed({\n client,\n deployerAddress,\n contracts,\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly deployerAddress: Hex;\n readonly contracts: readonly Contract[];\n}): Promise<readonly Hex[]> {\n // Deployments assume a deterministic deployer, so we only need to deploy the unique bytecode\n const uniqueContracts = uniqueBy(contracts, (contract) => contract.bytecode);\n\n const txs = (\n await Promise.all(uniqueContracts.map((contract) => ensureContract({ client, deployerAddress, ...contract })))\n ).flat();\n\n await waitForTransactions({\n client,\n hashes: txs,\n debugLabel: \"contract deploys\",\n });\n\n return txs;\n}\n","import { Account, Address, Chain, Client, Transport } from \"viem\";\nimport { getBalance, sendRawTransaction, sendTransaction, waitForTransactionReceipt } from \"viem/actions\";\nimport deployment from \"./create2/deployment.json\";\nimport { debug } from \"./debug\";\nimport { getDeployer } from \"./getDeployer\";\n\nconst deployer = `0x${deployment.address}` as const;\n\nexport async function ensureDeployer(client: Client<Transport, Chain | undefined, Account>): Promise<Address> {\n const existingDeployer = await getDeployer(client);\n if (existingDeployer !== undefined) {\n return existingDeployer;\n }\n\n // There's not really a way to simulate a pre-EIP-155 (no chain ID) transaction,\n // so we have to attempt to create the deployer first and, if it fails, fall back\n // to a regular deploy.\n\n // Send gas to deployment signer\n const gasRequired = BigInt(deployment.gasLimit) * BigInt(deployment.gasPrice);\n const currentBalance = await getBalance(client, { address: `0x${deployment.signerAddress}` });\n const gasNeeded = gasRequired - currentBalance;\n if (gasNeeded > 0) {\n debug(\"sending gas for CREATE2 deployer to signer at\", deployment.signerAddress);\n const gasTx = await sendTransaction(client, {\n chain: client.chain ?? null,\n to: `0x${deployment.signerAddress}`,\n value: gasNeeded,\n });\n const gasReceipt = await waitForTransactionReceipt(client, { hash: gasTx });\n if (gasReceipt.status !== \"success\") {\n console.error(\"failed to send gas to deployer signer\", gasReceipt);\n throw new Error(\"failed to send gas to deployer signer\");\n }\n }\n\n // Deploy the deployer\n debug(\"deploying CREATE2 deployer at\", deployer);\n const deployTx = await sendRawTransaction(client, { serializedTransaction: `0x${deployment.transaction}` }).catch(\n (error) => {\n // Do a regular contract create if the presigned transaction doesn't work due to replay protection\n if (String(error).includes(\"only replay-protected (EIP-155) transactions allowed over RPC\")) {\n console.warn(\n // eslint-disable-next-line max-len\n `\\n ⚠️ Your chain or RPC does not allow for non EIP-155 signed transactions, so your deploys will not be determinstic and contract addresses may change between deploys.\\n\\n We recommend running your chain's node with \\`--rpc.allow-unprotected-txs\\` to enable determinstic deployments.\\n`,\n );\n debug(\"deploying CREATE2 deployer\");\n return sendTransaction(client, {\n chain: client.chain ?? null,\n data: `0x${deployment.creationCode}`,\n });\n }\n throw error;\n },\n );\n\n const deployReceipt = await waitForTransactionReceipt(client, { hash: deployTx });\n if (!deployReceipt.contractAddress) {\n throw new Error(\"Deploy receipt did not have contract address, was the deployer not deployed?\");\n }\n\n if (deployReceipt.contractAddress !== deployer) {\n console.warn(\n `\\n ⚠️ CREATE2 deployer created at ${deployReceipt.contractAddress} does not match the CREATE2 determinstic deployer we expected (${deployer})`,\n );\n }\n\n return deployReceipt.contractAddress;\n}\n","{\n \"gasPrice\": 100000000000,\n \"gasLimit\": 100000,\n \"signerAddress\": \"3fab184622dc19b6109349b94811493bf2a45362\",\n \"transaction\": \"f8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222\",\n \"address\": \"4e59b44847b379578588920ca78fbf26c0b4956c\",\n \"creationCode\": \"604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3\"\n}\n","import { Address, Chain, Client, Transport, sliceHex } from \"viem\";\nimport { getCode } from \"viem/actions\";\nimport deployment from \"./create2/deployment.json\";\nimport { debug } from \"./debug\";\n\nconst deployer = `0x${deployment.address}` as const;\n\nexport async function getDeployer(client: Client<Transport, Chain | undefined>): Promise<Address | undefined> {\n const bytecode = await getCode(client, { address: deployer });\n if (bytecode) {\n debug(\"found deployer bytecode at\", deployer);\n // check if deployed bytecode is the same as the expected bytecode (minus 14-bytes creation code prefix)\n if (bytecode !== sliceHex(`0x${deployment.creationCode}`, 14)) {\n console.warn(\n `\\n ⚠️ Bytecode for deployer at ${deployer} did not match the expected CREATE2 bytecode. You may have unexpected results.\\n`,\n );\n }\n return deployer;\n }\n}\n","import { Hex, getCreate2Address } from \"viem\";\nimport { singletonSalt } from \"./common\";\n\nexport function getContractAddress({\n deployerAddress,\n bytecode,\n salt = singletonSalt,\n}: {\n readonly deployerAddress: Hex;\n readonly bytecode: Hex;\n readonly salt?: Hex;\n}): Hex {\n return getCreate2Address({ from: deployerAddress, bytecode, salt });\n}\n","import {\n BundlerRpcSchema,\n decodeFunctionResult,\n DecodeFunctionResultReturnType,\n EIP1193RequestFn,\n encodeFunctionData,\n Hex,\n zeroAddress,\n} from \"viem\";\nimport { getRpcMethod } from \"../common\";\nimport {\n entryPoint07Address,\n formatUserOperation,\n formatUserOperationRequest,\n toPackedUserOperation,\n UserOperation,\n} from \"viem/account-abstraction\";\nimport { bigIntMax } from \"../../utils\";\nimport { entryPointSimulationsAbi, entryPointSimulationsDeployedBytecode } from \"../entryPointSimulations\";\n\ntype rpcMethod = getRpcMethod<BundlerRpcSchema, \"eth_estimateUserOperationGas\">;\n\ntype EstimateUserOperationGasOptions = {\n request: EIP1193RequestFn;\n params: rpcMethod[\"Parameters\"];\n};\n\nexport async function estimateUserOperationGas({\n request,\n params,\n}: EstimateUserOperationGasOptions): Promise<rpcMethod[\"ReturnType\"]> {\n const userOp = formatUserOperation(params[0]);\n const hasPaymaster = userOp.paymaster != null && userOp.paymaster !== zeroAddress;\n\n const [simulationResult, simulationResultWithPaymaster] = await Promise.all([\n simulateHandleOp({ userOp, removePaymaster: hasPaymaster, request }),\n hasPaymaster ? simulateHandleOp({ userOp, request }) : undefined,\n ]);\n\n const gasEstimates = getGasEstimates({ userOp, simulationResult, simulationResultWithPaymaster });\n\n return formatUserOperationRequest({\n ...gasEstimates,\n });\n}\n\ntype SimulateHandleOpOptions = {\n request: EIP1193RequestFn;\n userOp: UserOperation<\"0.7\">;\n removePaymaster?: boolean;\n};\n\ntype SimulationResult = DecodeFunctionResultReturnType<typeof entryPointSimulationsAbi>;\n\nasync function simulateHandleOp({\n userOp,\n removePaymaster,\n request,\n}: SimulateHandleOpOptions): Promise<SimulationResult> {\n if (removePaymaster) {\n const {\n /* eslint-disable */\n paymaster,\n paymasterData,\n paymasterPostOpGasLimit,\n paymasterVerificationGasLimit,\n /* eslint-enable */\n ...userOpWithoutPaymaster\n } = userOp;\n userOp = userOpWithoutPaymaster;\n }\n\n // Prepare user operation for simulation\n const paymasterGasLimits =\n userOp.paymaster && !removePaymaster\n ? {\n paymasterPostOpGasLimit: 2_000_000n,\n paymasterVerificationGasLimit: 5_000_000n,\n }\n : {};\n const simulationUserOp = {\n ...userOp,\n preVerificationGas: 0n,\n callGasLimit: 10_000_000n,\n verificationGasLimit: 10_000_000n,\n // https://github.com/pimlicolabs/alto/blob/471998695e5ec75ef88dda3f8a534f47c24bcd1a/src/rpc/methods/eth_estimateUserOperationGas.ts#L117\n maxPriorityFeePerGas: userOp.maxFeePerGas,\n ...paymasterGasLimits,\n } satisfies UserOperation<\"0.7\">;\n\n const packedUserOp = toPackedUserOperation(simulationUserOp);\n const simulationData = encodeFunctionData({\n abi: entryPointSimulationsAbi,\n functionName: \"simulateHandleOp\",\n args: [packedUserOp, zeroAddress, \"0x\"],\n });\n\n const senderBalanceOverride = removePaymaster ? { [userOp.sender]: { balance: \"0xFFFFFFFFFFFFFFFFFFFF\" } } : {};\n const simulationParams = [\n {\n to: entryPoint07Address,\n data: simulationData,\n },\n \"pending\",\n {\n [entryPoint07Address]: { code: entryPointSimulationsDeployedBytecode },\n ...senderBalanceOverride,\n },\n ];\n const encodedSimulationResult: Hex = await request({\n method: \"wiresaw_call\",\n params: simulationParams,\n });\n\n return decodeFunctionResult({\n abi: entryPointSimulationsAbi,\n functionName: \"simulateHandleOp\",\n data: encodedSimulationResult,\n });\n}\n\ntype GetGasEstimatesOptions = {\n userOp: UserOperation<\"0.7\">;\n simulationResult: SimulationResult;\n simulationResultWithPaymaster?: SimulationResult;\n};\n\ntype GasEstimates = {\n verificationGasLimit: bigint;\n callGasLimit: bigint;\n paymasterVerificationGasLimit: bigint;\n paymasterPostOpGasLimit: bigint;\n preVerificationGas: bigint;\n};\n\nfunction getGasEstimates({\n userOp,\n simulationResult,\n simulationResultWithPaymaster,\n}: GetGasEstimatesOptions): GasEstimates {\n const hasPaymaster = simulationResultWithPaymaster != null;\n\n // The verification gas is the total gas available during the validation phase, including the gas used by the paymaster\n const verificationGas = hasPaymaster ? simulationResultWithPaymaster.preOpGas : simulationResult.preOpGas;\n\n // The paymaster verification gas is the difference between verification gas with and without paymaster\n const paymasterVerificationGas = hasPaymaster\n ? simulationResultWithPaymaster.preOpGas - simulationResult.preOpGas\n : 0n;\n\n // The call gas is only the gas used by the user operation, not the paymaster\n const callGas = simulationResult.paid / userOp.maxFeePerGas - simulationResult.preOpGas;\n\n // The paymaster post-op gas is the difference between non-verification gas with and without paymaster\n const paymasterPostOpGas = hasPaymaster\n ? simulationResultWithPaymaster.paid / userOp.maxFeePerGas - simulationResultWithPaymaster.preOpGas - callGas\n : 0n;\n\n // Apply a 2x buffer to the calculated limits\n const verificationGasLimit = verificationGas * 2n;\n const callGasLimit = bigIntMax(callGas * 2n, 9000n);\n const paymasterVerificationGasLimit = paymasterVerificationGas * 2n;\n const paymasterPostOpGasLimit = paymasterPostOpGas * 2n;\n\n return {\n verificationGasLimit,\n callGasLimit,\n paymasterVerificationGasLimit,\n paymasterPostOpGasLimit,\n preVerificationGas: 20_000n,\n };\n}\n","import { Hex } from \"viem\";\n\nexport const entryPointSimulationsAbi = [\n {\n inputs: [\n {\n components: [\n {\n internalType: \"address\",\n name: \"sender\",\n type: \"address\",\n },\n {\n internalType: \"uint256\",\n name: \"nonce\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"initCode\",\n type: \"bytes\",\n },\n {\n internalType: \"bytes\",\n name: \"callData\",\n type: \"bytes\",\n },\n {\n internalType: \"bytes32\",\n name: \"accountGasLimits\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"preVerificationGas\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"gasFees\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes\",\n name: \"paymasterAndData\",\n type: \"bytes\",\n },\n {\n internalType: \"bytes\",\n name: \"signature\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct PackedUserOperation\",\n name: \"op\",\n type: \"tuple\",\n },\n {\n internalType: \"address\",\n name: \"target\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"targetCallData\",\n type: \"bytes\",\n },\n ],\n name: \"simulateHandleOp\",\n outputs: [\n {\n components: [\n {\n internalType: \"uint256\",\n name: \"preOpGas\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"paid\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"accountValidationData\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"paymasterValidationData\",\n type: \"uint256\",\n },\n {\n internalType: \"bool\",\n name: \"targetSuccess\",\n type: \"bool\",\n },\n {\n internalType: \"bytes\",\n name: \"targetResult\",\n type: \"bytes\",\n },\n ],\n internalType: \"struct IEntryPointSimulations.ExecutionResult\",\n name: \"\",\n type: \"tuple\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\n// Modified version of the EntryPointSimulations contract that does not apply for a penalty for unused gas\n// https://github.com/latticexyz/account-abstraction/blob/3954ce708580d23073f477682f78942b253de7fa/contracts/core/EntryPoint.sol#L46\nexport const entryPointSimulationsDeployedBytecode: Hex =\n // eslint-disable-next-line max-len\n \"0x60806040526004361061016d5760003560e01c8063765e827f116100cb578063b760faf91161007f578063c3bce00911610059578063c3bce009146105ac578063dbed18e0146105d9578063fc7e286d146105f957600080fd5b8063b760faf914610564578063bb9fe6bf14610577578063c23a5cea1461058c57600080fd5b8063957122ab116100b0578063957122ab146104f757806397b2dcb9146105175780639b249f691461054457600080fd5b8063765e827f146104b7578063850aaf62146104d757600080fd5b8063205c28781161012257806335567e1a1161010757806335567e1a146102905780635287ce121461032557806370a082311461047457600080fd5b8063205c28781461025057806322cdde4c1461027057600080fd5b80630396cb60116101535780630396cb60146101e55780630bd28e3b146101f85780631b2e01b81461021857600080fd5b806242dc531461018257806301ffc9a7146101b557600080fd5b3661017d5761017b336106cb565b005b600080fd5b34801561018e57600080fd5b506101a261019d36600461423e565b6106ec565b6040519081526020015b60405180910390f35b3480156101c157600080fd5b506101d56101d0366004614304565b6108b7565b60405190151581526020016101ac565b61017b6101f3366004614346565b610a34565b34801561020457600080fd5b5061017b610213366004614394565b610dca565b34801561022457600080fd5b506101a26102333660046143af565b600160209081526000928352604080842090915290825290205481565b34801561025c57600080fd5b5061017b61026b3660046143e4565b610e12565b34801561027c57600080fd5b506101a261028b366004614429565b610fbc565b34801561029c57600080fd5b506101a26102ab3660046143af565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff8516845290915290819020549082901b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000161792915050565b34801561033157600080fd5b5061041261034036600461445e565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091525073ffffffffffffffffffffffffffffffffffffffff1660009081526020818152604091829020825160a0810184528154815260019091015460ff811615159282019290925261010082046dffffffffffffffffffffffffffff16928101929092526f01000000000000000000000000000000810463ffffffff166060830152730100000000000000000000000000000000000000900465ffffffffffff16608082015290565b6040516101ac9190600060a082019050825182526020830151151560208301526dffffffffffffffffffffffffffff604084015116604083015263ffffffff606084015116606083015265ffffffffffff608084015116608083015292915050565b34801561048057600080fd5b506101a261048f36600461445e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104c357600080fd5b5061017b6104d23660046144c0565b610ffe565b3480156104e357600080fd5b5061017b6104f2366004614517565b61117b565b34801561050357600080fd5b5061017b61051236600461456c565b611220565b34801561052357600080fd5b506105376105323660046145f1565b611378565b6040516101ac91906146c1565b34801561055057600080fd5b5061017b61055f366004614710565b6114c4565b61017b61057236600461445e565b6106cb565b34801561058357600080fd5b5061017b6115af565b34801561059857600080fd5b5061017b6105a736600461445e565b61178f565b3480156105b857600080fd5b506105cc6105c7366004614429565b611a7c565b6040516101ac9190614752565b3480156105e557600080fd5b5061017b6105f43660046144c0565b611d80565b34801561060557600080fd5b5061068161061436600461445e565b6000602081905290815260409020805460019091015460ff81169061010081046dffffffffffffffffffffffffffff16906f01000000000000000000000000000000810463ffffffff1690730100000000000000000000000000000000000000900465ffffffffffff1685565b6040805195865293151560208601526dffffffffffffffffffffffffffff9092169284019290925263ffffffff909116606083015265ffffffffffff16608082015260a0016101ac565b60015b60058110156106df576001016106ce565b6106e88261222c565b5050565b6000805a9050333014610760576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393220696e7465726e616c2063616c6c206f6e6c7900000000000000000060448201526064015b60405180910390fd5b8451606081015160a082015181016127100160405a603f028161078557610785614832565b0410156107b6577fdeaddead0000000000000000000000000000000000000000000000000000000060005260206000fd5b8751600090156108575760006107d3846000015160008c86612282565b9050806108555760006107e761080061229a565b80519091501561084f57846000015173ffffffffffffffffffffffffffffffffffffffff168a602001517f1c4fada7374c0a9ee8841fc38afe82932dc0f8e69012e927f061a8bae611a201876020015184604051610846929190614861565b60405180910390a35b60019250505b505b600088608001515a86030190506108a7828a8a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508792506122c6915050565b955050505050505b949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f60fc6b6e00000000000000000000000000000000000000000000000000000000148061094a57507fffffffff0000000000000000000000000000000000000000000000000000000082167f915074d800000000000000000000000000000000000000000000000000000000145b8061099657507fffffffff0000000000000000000000000000000000000000000000000000000082167fcf28ef9700000000000000000000000000000000000000000000000000000000145b806109e257507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e84f02100000000000000000000000000000000000000000000000000000000145b80610a2e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b33600090815260208190526040902063ffffffff8216610ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d757374207370656369667920756e7374616b652064656c61790000000000006044820152606401610757565b600181015463ffffffff6f0100000000000000000000000000000090910481169083161015610b3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f63616e6e6f7420646563726561736520756e7374616b652074696d65000000006044820152606401610757565b6001810154600090610b6390349061010090046dffffffffffffffffffffffffffff166148a9565b905060008111610bcf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6e6f207374616b652073706563696669656400000000000000000000000000006044820152606401610757565b6dffffffffffffffffffffffffffff811115610c47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f7374616b65206f766572666c6f770000000000000000000000000000000000006044820152606401610757565b6040805160a08101825283548152600160208083018281526dffffffffffffffffffffffffffff86811685870190815263ffffffff8a811660608801818152600060808a0181815233808352828a52918c90209a518b55965199909801805494519151965165ffffffffffff16730100000000000000000000000000000000000000027fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffffff979094166f0100000000000000000000000000000002969096167fffffffffffffff00000000000000000000ffffffffffffffffffffffffffffff91909516610100027fffffffffffffffffffffffffffffffffff0000000000000000000000000000ff991515999099167fffffffffffffffffffffffffffffffffff00000000000000000000000000000090941693909317979097179190911691909117179055835185815290810192909252917fa5ae833d0bb1dcd632d98a8b70973e8516812898e19bf27b70071ebc8dc52c01910160405180910390a2505050565b33600090815260016020908152604080832077ffffffffffffffffffffffffffffffffffffffffffffffff851684529091528120805491610e0a836148bc565b919050555050565b3360009081526020819052604090208054821115610e8c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f576974686472617720616d6f756e7420746f6f206c61726765000000000000006044820152606401610757565b8054610e999083906148f4565b81556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810184905233917fd1c19fbcd4551a5edfb66d43d2e337c04837afda3482b42bdf569a8fccdae5fb910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d8060008114610f46576040519150601f19603f3d011682016040523d82523d6000602084013e610f4b565b606091505b5050905080610fb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6661696c656420746f20776974686472617700000000000000000000000000006044820152606401610757565b50505050565b6000610fc7826124c2565b6040805160208101929092523090820152466060820152608001604051602081830303815290604052805190602001209050919050565b6110066124db565b8160008167ffffffffffffffff81111561102257611022613fd1565b60405190808252806020026020018201604052801561105b57816020015b611048613e25565b8152602001906001900390816110405790505b50905060005b828110156110d457600082828151811061107d5761107d614907565b602002602001015190506000806110b8848a8a878181106110a0576110a0614907565b90506020028101906110b29190614936565b8561251c565b915091506110c9848383600061277b565b505050600101611061565b506040516000907fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f972908290a160005b8381101561115e576111528188888481811061112157611121614907565b90506020028101906111339190614936565b85848151811061114557611145614907565b60200260200101516129d0565b90910190600101611103565b506111698482612da6565b5050506111766001600255565b505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1684846040516111a5929190614974565b600060405180830381855af49150503d80600081146111e0576040519150601f19603f3d011682016040523d82523d6000602084013e6111e5565b606091505b509150915081816040517f99410554000000000000000000000000000000000000000000000000000000008152600401610757929190614984565b83158015611243575073ffffffffffffffffffffffffffffffffffffffff83163b155b156112aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41413230206163636f756e74206e6f74206465706c6f796564000000000000006044820152606401610757565b6014811061133c5760006112c1601482848661499f565b6112ca916149c9565b60601c9050803b60000361133a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f41413330207061796d6173746572206e6f74206465706c6f79656400000000006044820152606401610757565b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260006024820152604401610757565b6113b36040518060c0016040528060008152602001600081526020016000815260200160008152602001600015158152602001606081525090565b6113bb6124db565b6113c3613e25565b6113cc86612eed565b6000806113db6000898561251c565b9150915060006113ed60008a866129d0565b90506000606073ffffffffffffffffffffffffffffffffffffffff8a161561147f578973ffffffffffffffffffffffffffffffffffffffff168989604051611436929190614974565b6000604051808303816000865af19150503d8060008114611473576040519150601f19603f3d011682016040523d82523d6000602084013e611478565b606091505b5090925090505b6040518060c001604052808760800151815260200184815260200186815260200185815260200183151581526020018281525096505050505050506108af6001600255565b60006114e560065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3684846040518363ffffffff1660e01b815260040161151f929190614a5a565b6020604051808303816000875af115801561153e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115629190614a6e565b6040517f6ca7b80600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152909150602401610757565b336000908152602081905260408120600181015490916f0100000000000000000000000000000090910463ffffffff169003611647576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b6564000000000000000000000000000000000000000000006044820152606401610757565b600181015460ff166116b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f616c726561647920756e7374616b696e670000000000000000000000000000006044820152606401610757565b60018101546000906116e0906f01000000000000000000000000000000900463ffffffff1642614a8b565b6001830180547fffffffffffffff000000000000ffffffffffffffffffffffffffffffffffff001673010000000000000000000000000000000000000065ffffffffffff84169081027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169190911790915560405190815290915033907ffa9b3c14cc825c412c9ed81b3ba365a5b459439403f18829e572ed53a4180f0a906020015b60405180910390a25050565b336000908152602081905260409020600181015461010090046dffffffffffffffffffffffffffff168061181f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4e6f207374616b6520746f2077697468647261770000000000000000000000006044820152606401610757565b6001820154730100000000000000000000000000000000000000900465ffffffffffff166118a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6d7573742063616c6c20756e6c6f636b5374616b6528292066697273740000006044820152606401610757565b60018201544273010000000000000000000000000000000000000090910465ffffffffffff161115611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5374616b65207769746864726177616c206973206e6f742064756500000000006044820152606401610757565b6001820180547fffffffffffffff000000000000000000000000000000000000000000000000ff1690556040805173ffffffffffffffffffffffffffffffffffffffff851681526020810183905233917fb7c918e0e249f999e965cafeb6c664271b3f4317d296461500e71da39f0cbda3910160405180910390a260008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611a0c576040519150601f19603f3d011682016040523d82523d6000602084013e611a11565b606091505b5050905080610fb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661696c656420746f207769746864726177207374616b6500000000000000006044820152606401610757565b611a84613ed7565b611a8c613e25565b611a9583612eed565b600080611aa46000868561251c565b845160e001516040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff95861683528282528483206001908101546dffffffffffffffffffffffffffff6101008083048216885263ffffffff6f010000000000000000000000000000009384900481169095528e51518951808b018b5288815280880189815291909b168852878752898820909401549081049091168952049091169052835180850190945281845283015293955091935090366000611b7460408b018b614ab1565b909250905060006014821015611b8b576000611ba6565b611b9960146000848661499f565b611ba2916149c9565b60601c5b6040805180820182526000808252602080830182815273ffffffffffffffffffffffffffffffffffffffff86168352908290529290206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff169091529091509350505050600085905060006040518060a001604052808960800151815260200189604001518152602001888152602001878152602001611c588a6060015190565b905260408051808201825260035473ffffffffffffffffffffffffffffffffffffffff908116825282518084019093526004548352600554602084810191909152820192909252919250831615801590611cc9575060018373ffffffffffffffffffffffffffffffffffffffff1614155b15611d4d5760408051808201825273ffffffffffffffffffffffffffffffffffffffff851680825282518084018452600080825260208083018281529382528181529490206001015461010081046dffffffffffffffffffffffffffff1682526f01000000000000000000000000000000900463ffffffff16909152909182015290505b6040805160a081018252928352602083019590955293810192909252506060810192909252608082015295945050505050565b611d886124db565b816000805b82811015611f7a5736868683818110611da857611da8614907565b9050602002810190611dba9190614b16565b9050366000611dc98380614b4a565b90925090506000611de0604085016020860161445e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff821601611e81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4141393620696e76616c69642061676772656761746f720000000000000000006044820152606401610757565b73ffffffffffffffffffffffffffffffffffffffff811615611f5e5773ffffffffffffffffffffffffffffffffffffffff8116632dd811338484611ec86040890189614ab1565b6040518563ffffffff1660e01b8152600401611ee79493929190614d02565b60006040518083038186803b158015611eff57600080fd5b505afa925050508015611f10575060015b611f5e576040517f86a9f75000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610757565b611f6882876148a9565b95505060019093019250611d8d915050565b5060008167ffffffffffffffff811115611f9657611f96613fd1565b604051908082528060200260200182016040528015611fcf57816020015b611fbc613e25565b815260200190600190039081611fb45790505b5090506000805b848110156120ac5736888883818110611ff157611ff1614907565b90506020028101906120039190614b16565b90503660006120128380614b4a565b90925090506000612029604085016020860161445e565b90508160005b8181101561209a57600089898151811061204b5761204b614907565b6020026020010151905060008061206e8b8989878181106110a0576110a0614907565b9150915061207e8483838961277b565b8a612088816148bc565b9b50506001909301925061202f915050565b505060019094019350611fd692505050565b506040517fbb47ee3e183a558b1a2ff0874b079f3fc5478b7454eacf2bfc5af2ff5878f97290600090a150600080805b858110156121e757368989838181106120f7576120f7614907565b90506020028101906121099190614b16565b905061211b604082016020830161445e565b73ffffffffffffffffffffffffffffffffffffffff167f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d60405160405180910390a236600061216a8380614b4a565b90925090508060005b818110156121d6576121b58885858481811061219157612191614907565b90506020028101906121a39190614936565b8b8b8151811061114557611145614907565b6121bf90886148a9565b9650876121cb816148bc565b985050600101612173565b5050600190930192506120dc915050565b506040516000907f575ff3acadd5ab348fe1855e217e0f3678f8d767d7494c9f9fefbee2e17cca4d908290a261221d8682612da6565b50505050506111766001600255565b600061223882346130db565b90508173ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c48260405161178391815260200190565b6000806000845160208601878987f195945050505050565b60603d828111156122a85750815b604051602082018101604052818152816000602083013e9392505050565b6000805a8551909150600090816122dc8261311b565b60e083015190915073ffffffffffffffffffffffffffffffffffffffff81166123085782519350612403565b80935060008851111561240357868202955060028a600281111561232e5761232e614db9565b146124035760a08301516040517f7c627b2100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff831691637c627b2191612390908e908d908c908990600401614de8565b600060405180830381600088803b1580156123aa57600080fd5b5087f1935050505080156123bc575060015b6124035760006123cd61080061229a565b9050806040517fad7954bc0000000000000000000000000000000000000000000000000000000081526004016107579190614e4b565b5a60408a0151908603979097019682880296508681101561247f5760028b600281111561243257612432614db9565b03612455578096506124438a613145565b6124508a6000898b6131a1565b6124b4565b7fdeadaa510000000000000000000000000000000000000000000000000000000060005260206000fd5b86810361248c86826130db565b506000808d60028111156124a2576124a2614db9565b1490506124b18c828b8d6131a1565b50505b505050505050949350505050565b60006124cd82613229565b805190602001209050919050565b6002805403612516576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b60008060005a845190915061253186826132ee565b61253a86610fbc565b6020860152604081015161012082015161010083015160a08401516080850151606086015160c0870151861717171717176effffffffffffffffffffffffffffff8111156125e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f41413934206761732076616c756573206f766572666c6f7700000000000000006044820152606401610757565b60006126138460c081015160a08201516080830151606084015160408501516101009095015194010101010290565b90506126228a8a8a8487613439565b96506126368460000151856020015161367a565b6126a557896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601a908201527f4141323520696e76616c6964206163636f756e74206e6f6e6365000000000000606082015260800190565b825a8603111561271a57896040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413236206f76657220766572696669636174696f6e4761734c696d69740000606082015260800190565b60e084015160609073ffffffffffffffffffffffffffffffffffffffff161561274e576127498b8b8b856136d5565b975090505b604089018290528060608a015260a08a01355a870301896080018181525050505050505050935093915050565b6000806127878561392c565b915091508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461282957856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413234207369676e6174757265206572726f72000000000000000000000000606082015260800190565b801561289a57856040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f414132322065787069726564206f72206e6f7420647565000000000000000000606082015260800190565b60006128a58561392c565b9250905073ffffffffffffffffffffffffffffffffffffffff81161561293057866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526014908201527f41413334207369676e6174757265206572726f72000000000000000000000000606082015260800190565b81156129c757866040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526021908201527f41413332207061796d61737465722065787069726564206f72206e6f7420647560608201527f6500000000000000000000000000000000000000000000000000000000000000608082015260a00190565b50505050505050565b6000805a905060006129e3846060015190565b60405190915060009036826129fb60608a018a614ab1565b9150915060606000826003811115612a1257843591505b507f72288ed1000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601612b525760008b8b60200151604051602401612a75929190614e5e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8dd7712f000000000000000000000000000000000000000000000000000000001790525190915030906242dc5390612b089084908f908d90602401614f44565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050925050612bc9565b3073ffffffffffffffffffffffffffffffffffffffff166242dc5385858d8b604051602401612b849493929190614f84565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505091505b602060008351602085016000305af19550600051985084604052505050505080612d9c5760003d80602003612c045760206000803e60005191505b507fdeaddead000000000000000000000000000000000000000000000000000000008103612c9757876040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052600f908201527f41413935206f7574206f66206761730000000000000000000000000000000000606082015260800190565b7fdeadaa51000000000000000000000000000000000000000000000000000000008103612d0157600086608001515a612cd090876148f4565b612cda91906148a9565b6040880151909150612ceb88613145565b612cf888600083856131a1565b9550612d9a9050565b8551805160208089015192015173ffffffffffffffffffffffffffffffffffffffff90911691907ff62676f440ff169a3a9afdbf812e89e7f95975ee8e5c31214ffdef631c5f479290612d5561080061229a565b604051612d63929190614861565b60405180910390a3600086608001515a612d7d90876148f4565b612d8791906148a9565b9050612d9660028886846122c6565b9550505b505b5050509392505050565b73ffffffffffffffffffffffffffffffffffffffff8216612e23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4141393020696e76616c69642062656e656669636961727900000000000000006044820152606401610757565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612e7d576040519150601f19603f3d011682016040523d82523d6000602084013e612e82565b606091505b5050905080611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f41413931206661696c65642073656e6420746f2062656e6566696369617279006044820152606401610757565b612fed6040517fd69400000000000000000000000000000000000000000000000000000000000060208201527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660228201527f01000000000000000000000000000000000000000000000000000000000000006036820152600090603701604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00181529190528051602090910120600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550565b3063957122ab6130006040840184614ab1565b61300d602086018661445e565b61301a60e0870187614ab1565b6040518663ffffffff1660e01b815260040161303a959493929190614fbb565b60006040518083038186803b15801561305257600080fd5b505afa925050508015613063575060015b6130d85761306f61500a565b806308c379a0036130cc5750613083615026565b8061308e57506130ce565b8051156106e8576000816040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757929190614861565b505b3d6000803e3d6000fd5b50565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604081208054829061310f9085906148a9565b91829055509392505050565b61010081015161012082015160009190808203613139575092915050565b6108af8248830161397f565b805180516020808401519281015160405190815273ffffffffffffffffffffffffffffffffffffffff90921692917f67b4fa9642f42120bf031f3051d1824b0fe25627945b27b8a6a65d5761d5482e910160405180910390a350565b835160e0810151815160208088015193015160405173ffffffffffffffffffffffffffffffffffffffff9384169492909316927f49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f9161321b9189908990899093845291151560208401526040830152606082015260800190565b60405180910390a450505050565b60608135602083013560006132496132446040870187614ab1565b613997565b9050600061325d6132446060880188614ab1565b9050608086013560a087013560c0880135600061328061324460e08c018c614ab1565b6040805173ffffffffffffffffffffffffffffffffffffffff9a909a1660208b015289810198909852606089019690965250608087019390935260a086019190915260c085015260e08401526101008084019190915281518084039091018152610120909201905292915050565b6132fb602083018361445e565b73ffffffffffffffffffffffffffffffffffffffff168152602082810135908201526fffffffffffffffffffffffffffffffff6080808401358281166060850152811c604084015260a084013560c0808501919091528401359182166101008401521c61012082015236600061337460e0850185614ab1565b9092509050801561341e5760348110156133ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4141393320696e76616c6964207061796d6173746572416e64446174610000006044820152606401610757565b6133f482826139aa565b60a0860152608085015273ffffffffffffffffffffffffffffffffffffffff1660e0840152610fb6565b600060e084018190526080840181905260a084015250505050565b8251805160009190613458888761345360408b018b614ab1565b613a1b565b60e0820151600073ffffffffffffffffffffffffffffffffffffffff82166134b65773ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020548781116134af578088036134b2565b60005b9150505b60208801516040517f19822f7c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516916319822f7c918991613512918e919087906004016150ce565b60206040518083038160008887f19350505050801561356c575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613569918101906150f3565b60015b6135b0578961357c61080061229a565b6040517f65c8fd4d00000000000000000000000000000000000000000000000000000000815260040161075792919061510c565b945073ffffffffffffffffffffffffffffffffffffffff821661366d5773ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020805480891115613667578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526017908201527f41413231206469646e2774207061792070726566756e64000000000000000000606082015260800190565b88900390555b5050505095945050505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020908152604080832084821c808552925282208054849167ffffffffffffffff83169190856136c7836148bc565b909155501495945050505050565b60606000805a855160e081015173ffffffffffffffffffffffffffffffffffffffff811660009081526020819052604090208054939450919290919087811015613784578a6040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601e908201527f41413331207061796d6173746572206465706f73697420746f6f206c6f770000606082015260800190565b87810382600001819055506000846080015190508373ffffffffffffffffffffffffffffffffffffffff166352b7512c828d8d602001518d6040518563ffffffff1660e01b81526004016137da939291906150ce565b60006040518083038160008887f19350505050801561383957506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526138369190810190615159565b60015b61387d578b61384961080061229a565b6040517f65c8fd4d0000000000000000000000000000000000000000000000000000000081526004016107579291906151e5565b9098509650805a8703111561391d578b6040517f220266b60000000000000000000000000000000000000000000000000000000081526004016107579181526040602082018190526027908201527f41413336206f766572207061796d6173746572566572696669636174696f6e4760608201527f61734c696d697400000000000000000000000000000000000000000000000000608082015260a00190565b50505050505094509492505050565b6000808260000361394257506000928392509050565b600061394d84613da7565b9050806040015165ffffffffffff164211806139745750806020015165ffffffffffff1642105b905194909350915050565b600081831061398e5781613990565b825b9392505050565b6000604051828085833790209392505050565b600080806139bb601482868861499f565b6139c4916149c9565b60601c6139d560246014878961499f565b6139de91615232565b60801c6139ef60346024888a61499f565b6139f891615232565b9194506fffffffffffffffffffffffffffffffff16925060801c90509250925092565b8015610fb65782515173ffffffffffffffffffffffffffffffffffffffff81163b15613aac57846040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601f908201527f414131302073656e64657220616c726561647920636f6e737472756374656400606082015260800190565b6000613acd60065473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1663570e1a3686600001516040015186866040518463ffffffff1660e01b8152600401613b10929190614a5a565b60206040518083038160008887f1158015613b2f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613b549190614a6e565b905073ffffffffffffffffffffffffffffffffffffffff8116613bdc57856040517f220266b6000000000000000000000000000000000000000000000000000000008152600401610757918152604060208201819052601b908201527f4141313320696e6974436f6465206661696c6564206f72204f4f470000000000606082015260800190565b8173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613c7957856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313420696e6974436f6465206d7573742072657475726e2073656e646572606082015260800190565b8073ffffffffffffffffffffffffffffffffffffffff163b600003613d0257856040517f220266b600000000000000000000000000000000000000000000000000000000815260040161075791815260406020808301829052908201527f4141313520696e6974436f6465206d757374206372656174652073656e646572606082015260800190565b6000613d11601482868861499f565b613d1a916149c9565b60601c90508273ffffffffffffffffffffffffffffffffffffffff1686602001517fd51a9c61267aa6196961883ecf5ff2da6619c37dac0fa92122513fb32c032d2d83896000015160e00151604051613d9692919073ffffffffffffffffffffffffffffffffffffffff92831681529116602082015260400190565b60405180910390a350505050505050565b60408051606081018252600080825260208201819052918101919091528160a081901c65ffffffffffff8116600003613de3575065ffffffffffff5b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff909316835260d09490941c602083015265ffffffffffff16928101929092525090565b6040518060a00160405280613eb2604051806101400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b8152602001600080191681526020016000815260200160008152602001600081525090565b6040518060a00160405280613f146040518060a0016040528060008152602001600081526020016000815260200160008152602001606081525090565b8152602001613f36604051806040016040528060008152602001600081525090565b8152602001613f58604051806040016040528060008152602001600081525090565b8152602001613f7a604051806040016040528060008152602001600081525090565b8152602001613f87613f8c565b905290565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001613f87604051806040016040528060008152602001600081525090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810181811067ffffffffffffffff8211171561402057614020613fd1565b60405250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561406a5761406a613fd1565b6040525050565b604051610140810167ffffffffffffffff8111828210171561409557614095613fd1565b60405290565b600067ffffffffffffffff8211156140b5576140b5613fd1565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b73ffffffffffffffffffffffffffffffffffffffff811681146130d857600080fd5b803561410e816140e1565b919050565b60008183036101c081121561412757600080fd5b60405161413381614000565b8092506101408083121561414657600080fd5b61414e614071565b925061415985614103565b83526020850135602084015260408501356040840152606085013560608401526080850135608084015260a085013560a084015260c085013560c08401526141a360e08601614103565b60e084015261010085810135908401526101208086013590840152918152908301356020820152610160830135604082015261018083013560608201526101a090920135608090920191909152919050565b60008083601f84011261420757600080fd5b50813567ffffffffffffffff81111561421f57600080fd5b60208301915083602082850101111561423757600080fd5b9250929050565b600080600080610200858703121561425557600080fd5b843567ffffffffffffffff8082111561426d57600080fd5b818701915087601f83011261428157600080fd5b813561428c8161409b565b6040516142998282614026565b8281528a60208487010111156142ae57600080fd5b826020860160208301376000602084830101528098505050506142d48860208901614113565b94506101e08701359150808211156142eb57600080fd5b506142f8878288016141f5565b95989497509550505050565b60006020828403121561431657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461399057600080fd5b60006020828403121561435857600080fd5b813563ffffffff8116811461399057600080fd5b803577ffffffffffffffffffffffffffffffffffffffffffffffff8116811461410e57600080fd5b6000602082840312156143a657600080fd5b6139908261436c565b600080604083850312156143c257600080fd5b82356143cd816140e1565b91506143db6020840161436c565b90509250929050565b600080604083850312156143f757600080fd5b8235614402816140e1565b946020939093013593505050565b6000610120828403121561442357600080fd5b50919050565b60006020828403121561443b57600080fd5b813567ffffffffffffffff81111561445257600080fd5b6108af84828501614410565b60006020828403121561447057600080fd5b8135613990816140e1565b60008083601f84011261448d57600080fd5b50813567ffffffffffffffff8111156144a557600080fd5b6020830191508360208260051b850101111561423757600080fd5b6000806000604084860312156144d557600080fd5b833567ffffffffffffffff8111156144ec57600080fd5b6144f88682870161447b565b909450925050602084013561450c816140e1565b809150509250925092565b60008060006040848603121561452c57600080fd5b8335614537816140e1565b9250602084013567ffffffffffffffff81111561455357600080fd5b61455f868287016141f5565b9497909650939450505050565b60008060008060006060868803121561458457600080fd5b853567ffffffffffffffff8082111561459c57600080fd5b6145a889838a016141f5565b9097509550602088013591506145bd826140e1565b909350604087013590808211156145d357600080fd5b506145e0888289016141f5565b969995985093965092949392505050565b6000806000806060858703121561460757600080fd5b843567ffffffffffffffff8082111561461f57600080fd5b61462b88838901614410565b95506020870135915061463d826140e1565b909350604086013590808211156142eb57600080fd5b60005b8381101561466e578181015183820152602001614656565b50506000910152565b6000815180845261468f816020860160208601614653565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526080820151151560a0820152600060a083015160c0808401526108af60e0840182614677565b6000806020838503121561472357600080fd5b823567ffffffffffffffff81111561473a57600080fd5b614746858286016141f5565b90969095509350505050565b602080825282516101408383015280516101608401529081015161018083015260408101516101a083015260608101516101c08301526080015160a06101e08301526000906147a5610200840182614677565b905060208401516147c3604085018280518252602090810151910152565b506040840151805160808581019190915260209182015160a08601526060860151805160c087015282015160e0860152850151805173ffffffffffffffffffffffffffffffffffffffff1661010086015280820151805161012087015290910151610140850152509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8281526040602082015260006108af6040830184614677565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a2e57610a2e61487a565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036148ed576148ed61487a565b5060010190565b81810381811115610a2e57610a2e61487a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee183360301811261496a57600080fd5b9190910192915050565b8183823760009101908152919050565b82151581526040602082015260006108af6040830184614677565b600080858511156149af57600080fd5b838611156149bc57600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015614a095780818660140360031b1b83161692505b505092915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006108af602083018486614a11565b600060208284031215614a8057600080fd5b8151613990816140e1565b65ffffffffffff818116838216019080821115614aaa57614aaa61487a565b5092915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614ae657600080fd5b83018035915067ffffffffffffffff821115614b0157600080fd5b60200191503681900382131561423757600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261496a57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b7f57600080fd5b83018035915067ffffffffffffffff821115614b9a57600080fd5b6020019150600581901b360382131561423757600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614be757600080fd5b830160208101925035905067ffffffffffffffff811115614c0757600080fd5b80360382131561423757600080fd5b6000610120614c4284614c2885614103565b73ffffffffffffffffffffffffffffffffffffffff169052565b60208301356020850152614c596040840184614bb2565b826040870152614c6c8387018284614a11565b92505050614c7d6060840184614bb2565b8583036060870152614c90838284614a11565b925050506080830135608085015260a083013560a085015260c083013560c0850152614cbf60e0840184614bb2565b85830360e0870152614cd2838284614a11565b92505050610100614ce581850185614bb2565b86840383880152614cf7848284614a11565b979650505050505050565b6040808252810184905260006060600586901b830181019083018783805b89811015614da2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087860301845282357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee18c3603018112614d80578283fd5b614d8c868d8301614c16565b9550506020938401939290920191600101614d20565b505050508281036020840152614cf7818587614a11565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600060038610614e21577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b85825260806020830152614e386080830186614677565b6040830194909452506060015292915050565b6020815260006139906020830184614677565b604081526000614e716040830185614c16565b90508260208301529392505050565b8051805173ffffffffffffffffffffffffffffffffffffffff1683526020810151602084015260408101516040840152606081015160608401526080810151608084015260a081015160a084015260c081015160c084015260e0810151614eff60e085018273ffffffffffffffffffffffffffffffffffffffff169052565b5061010081810151908401526101209081015190830152602081015161014083015260408101516101608301526060810151610180830152608001516101a090910152565b6000610200808352614f5881840187614677565b9050614f676020840186614e80565b8281036101e0840152614f7a8185614677565b9695505050505050565b6000610200808352614f998184018789614a11565b9050614fa86020840186614e80565b8281036101e0840152614cf78185614677565b606081526000614fcf606083018789614a11565b73ffffffffffffffffffffffffffffffffffffffff861660208401528281036040840152614ffe818587614a11565b98975050505050505050565b600060033d11156150235760046000803e5060005160e01c5b90565b600060443d10156150345790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561508257505050505090565b828501915081518181111561509a5750505050505090565b843d87010160208285010111156150b45750505050505090565b6150c360208286010187614026565b509095945050505050565b6060815260006150e16060830186614c16565b60208301949094525060400152919050565b60006020828403121561510557600080fd5b5051919050565b82815260606020820152600d60608201527f4141323320726576657274656400000000000000000000000000000000000000608082015260a0604082015260006108af60a0830184614677565b6000806040838503121561516c57600080fd5b825167ffffffffffffffff81111561518357600080fd5b8301601f8101851361519457600080fd5b805161519f8161409b565b6040516151ac8282614026565b8281528760208486010111156151c157600080fd5b6151d2836020830160208701614653565b6020969096015195979596505050505050565b82815260606020820152600d60608201527f4141333320726576657274656400000000000000000000000000000000000000608082015260a0604082015260006108af60a0830184614677565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008135818116916010851015614a095760109490940360031b84901b169092169291505056fea2646970667358221220d91a0462bc7bb528fdf3ea5e6747c873aa8d3c3eb82ba653aef7f1948cad609264736f6c63430008170033\";\n","import {\n Address,\n ExtractAbiItem,\n Hex,\n RpcTransactionReceipt,\n RpcUserOperationReceipt,\n decodeEventLog,\n encodeEventTopics,\n numberToHex,\n parseEventLogs,\n zeroAddress,\n} from \"viem\";\nimport { entryPoint07Abi } from \"viem/account-abstraction\";\n\nconst userOperationRevertReasonAbi = [\n entryPoint07Abi.find(\n (item): item is ExtractAbiItem<typeof entryPoint07Abi, \"UserOperationRevertReason\"> =>\n item.type === \"event\" && item.name === \"UserOperationRevertReason\",\n )!,\n] as const;\n\nconst userOperationEventTopic = encodeEventTopics({\n abi: entryPoint07Abi,\n eventName: \"UserOperationEvent\",\n});\n\nexport function getUserOperationReceipt(userOpHash: Hex, receipt: RpcTransactionReceipt): RpcUserOperationReceipt {\n const userOperationRevertReasonTopicEvent = encodeEventTopics({\n abi: userOperationRevertReasonAbi,\n })[0];\n\n let entryPoint: Address = zeroAddress;\n let revertReason = undefined;\n\n let startIndex = -1;\n let endIndex = -1;\n receipt.logs.forEach((log, index) => {\n if (log?.topics[0] === userOperationEventTopic[0]) {\n // process UserOperationEvent\n if (log.topics[1] === userOpHash) {\n // it's our userOpHash. save as end of logs array\n endIndex = index;\n entryPoint = log.address;\n } else if (endIndex === -1) {\n // it's a different hash. remember it as beginning index, but only if we didn't find our end index yet.\n startIndex = index;\n }\n }\n\n if (log?.topics[0] === userOperationRevertReasonTopicEvent) {\n // process UserOperationRevertReason\n if (log.topics[1] === userOpHash) {\n // it's our userOpHash. capture revert reason.\n const decodedLog = decodeEventLog({\n abi: userOperationRevertReasonAbi,\n data: log.data,\n topics: log.topics,\n });\n\n revertReason = decodedLog.args.revertReason;\n }\n }\n });\n\n if (endIndex === -1) {\n throw new Error(\"fatal: no UserOperationEvent in logs\");\n }\n\n const logs = receipt.logs.slice(startIndex + 1, endIndex);\n\n const userOperationEvent = parseEventLogs({\n abi: entryPoint07Abi,\n eventName: \"UserOperationEvent\",\n args: {\n userOpHash,\n },\n logs: receipt.logs,\n })[0]!;\n\n let paymaster: Address | undefined = userOperationEvent.args.paymaster;\n paymaster = paymaster === zeroAddress ? undefined : paymaster;\n\n return {\n userOpHash,\n entryPoint,\n sender: userOperationEvent.args.sender,\n nonce: numberToHex(userOperationEvent.args.nonce),\n paymaster,\n actualGasUsed: numberToHex(userOperationEvent.args.actualGasUsed),\n actualGasCost: numberToHex(userOperationEvent.args.actualGasCost),\n success: userOperationEvent.args.success,\n reason: revertReason,\n logs,\n receipt,\n };\n}\n","import { EIP1193RequestFn, Hex, HttpTransport, RpcTransactionReceipt, Transport } from \"viem\";\nimport { estimateUserOperationGas } from \"./methods/estimateUserOperationGas\";\nimport { getUserOperationReceipt } from \"./methods/getUserOperationReceipt\";\n\ntype WiresawSendUserOperationResult = {\n txHash: Hex;\n userOpHash: Hex;\n};\n\ntype WiresawOptions<transport extends Transport> = {\n wiresaw: transport;\n fallbackBundler?: HttpTransport;\n fallbackEth?: HttpTransport;\n};\n\nexport function wiresaw<const wiresawTransport extends Transport>(\n transport: WiresawOptions<wiresawTransport>,\n): wiresawTransport {\n return ((opts) => {\n const { request: originalRequest, ...rest } = transport.wiresaw(opts);\n\n let chainId: Hex | null = null;\n const transactionHashes: { [userOpHash: Hex]: Hex } = {};\n const transactionReceipts: { [transactionHashes: Hex]: RpcTransactionReceipt } = {};\n\n return {\n ...rest,\n // TODO: type `request` so we don't have to cast\n async request(req): ReturnType<EIP1193RequestFn> {\n if (req.method === \"eth_chainId\") {\n if (chainId != null) return chainId;\n if (transport.fallbackEth) {\n const { request: fallbackRequest } = transport.fallbackEth(opts);\n return (chainId = await fallbackRequest(req));\n }\n return (chainId = await originalRequest(req));\n }\n\n if (req.method === \"eth_estimateGas\") {\n return originalRequest({ ...req, method: \"wiresaw_estimateGas\" });\n }\n\n if (req.method === \"eth_call\") {\n return originalRequest({ ...req, method: \"wiresaw_call\" });\n }\n\n if (req.method === \"eth_getTransactionCount\") {\n return originalRequest({ ...req, method: \"wiresaw_getTransactionCount\" });\n }\n\n if (req.method === \"eth_getTransactionReceipt\") {\n return getTransactionReceipt((req.params as [Hex])[0]);\n }\n\n if (req.method === \"eth_sendUserOperation\") {\n const { userOpHash, txHash } = (await originalRequest({\n ...req,\n method: \"wiresaw_sendUserOperation\",\n })) as WiresawSendUserOperationResult;\n transactionHashes[userOpHash] = txHash;\n return userOpHash;\n }\n\n if (req.method === \"eth_getUserOperationReceipt\") {\n const userOpHash = (req.params as [Hex])[0];\n const knownTransactionHash = transactionHashes[userOpHash];\n if (knownTransactionHash) {\n const transactionReceipt = await getTransactionReceipt(knownTransactionHash);\n if (transactionReceipt) {\n return getUserOperationReceipt(userOpHash, transactionReceipt);\n }\n }\n if (transport.fallbackBundler) {\n const { request: fallbackRequest } = transport.fallbackBundler(opts);\n return fallbackRequest(req);\n }\n }\n\n if (req.method === \"eth_estimateUserOperationGas\") {\n try {\n return await estimateUserOperationGas({\n request: originalRequest,\n params: req.params as never,\n });\n } catch (e) {\n console.warn(\"[wiresaw] estimating user operation gas failed, falling back to bundler\", e);\n }\n\n if (transport.fallbackBundler) {\n const { request: fallbackRequest } = transport.fallbackBundler(opts);\n return fallbackRequest(req);\n }\n }\n\n // Fallback to regular RPC for methods that don't require wiresaw\n if (\n req.method === \"eth_blockNumber\" ||\n req.method === \"eth_getBlockByNumber\" ||\n req.method === \"eth_maxPriorityFeePerGas\"\n ) {\n if (transport.fallbackEth) {\n const { request: fallbackRequest } = transport.fallbackEth(opts);\n return fallbackRequest(req);\n }\n return originalRequest(req);\n }\n\n return originalRequest(req);\n\n async function getTransactionReceipt(hash: Hex): Promise<RpcTransactionReceipt | undefined> {\n // Return cached receipt if available\n if (transactionReceipts[hash]) return transactionReceipts[hash];\n\n // Fetch pending receipt\n const pendingReceipt = (await originalRequest({\n ...req,\n method: \"wiresaw_getTransactionReceipt\",\n params: [hash],\n })) as RpcTransactionReceipt | undefined;\n if (pendingReceipt) {\n transactionReceipts[hash] = pendingReceipt;\n return pendingReceipt;\n }\n\n if (transport.fallbackEth) {\n const { request: fallbackRequest } = transport.fallbackEth(opts);\n const receipt = (await fallbackRequest({\n ...req,\n method: \"eth_getTransactionReceipt\",\n params: [hash],\n })) as RpcTransactionReceipt | undefined;\n if (receipt) {\n transactionReceipts[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EA,cAAI,UAAU,aAAa;AACzB,kBAAM,EAAE,SAAS,gBAAgB,IAAI,UAAU,YAAY,IAAI;AAC/D,kBAAM,UAAW,MAAM,gBAAgB;AAAA,cACrC,GAAG;AAAA,cACH,QAAQ;AAAA,cACR,QAAQ,CAAC,IAAI;AAAA,YACf,CAAC;AACD,gBAAI,SAAS;AACX,kCAAoB,IAAI,IAAI;AAC5B,qBAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":["debug","debug","sendTransaction","waitForTransactionReceipt","getCode","getCode","debug","deployer","debug","sendTransaction","waitForTransactionReceipt","error","getCreate2Address","getCreate2Address","zeroAddress"]}
|
|
1
|
+
{"version":3,"sources":["../src/waitForTransactions.ts","../src/deploy/ensureContract.ts","../src/deploy/common.ts","../src/deploy/debug.ts","../src/deploy/ensureContractsDeployed.ts","../src/deploy/ensureDeployer.ts","../src/deploy/create2/deployment.json","../src/deploy/getDeployer.ts","../src/deploy/getContractAddress.ts"],"sourcesContent":["import { Client, Transport, Chain, Account, Hex } from \"viem\";\nimport { debug } from \"./debug\";\nimport { waitForTransactionReceipt } from \"viem/actions\";\n\nexport async function waitForTransactions({\n client,\n hashes,\n debugLabel = \"transactions\",\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly hashes: readonly Hex[];\n readonly debugLabel?: string;\n}): Promise<void> {\n if (!hashes.length) return;\n\n debug(`waiting for ${debugLabel} to confirm`);\n // wait for each tx separately/serially, because parallelizing results in RPC errors\n for (const hash of hashes) {\n const receipt = await waitForTransactionReceipt(client, { hash });\n // TODO: handle user op failures?\n if (receipt.status === \"reverted\") {\n throw new Error(`Transaction reverted: ${hash}`);\n }\n }\n}\n","import { Client, Transport, Chain, Account, concatHex, getCreate2Address, Hex } from \"viem\";\nimport { getCode } from \"viem/actions\";\nimport { contractSizeLimit, singletonSalt } from \"./common\";\nimport { debug } from \"./debug\";\nimport { sendTransaction } from \"../sendTransaction\";\n\nexport type Contract = {\n bytecode: Hex;\n deployedBytecodeSize?: number;\n debugLabel?: string;\n salt?: Hex;\n};\n\nexport async function ensureContract({\n client,\n deployerAddress,\n bytecode,\n deployedBytecodeSize,\n debugLabel = \"contract\",\n salt = singletonSalt,\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly deployerAddress: Hex;\n} & Contract): Promise<readonly Hex[]> {\n if (bytecode.includes(\"__$\")) {\n throw new Error(`Found unlinked public library in ${debugLabel} bytecode`);\n }\n\n const address = getCreate2Address({ from: deployerAddress, salt, bytecode });\n\n const contractCode = await getCode(client, { address, blockTag: \"pending\" });\n if (contractCode) {\n debug(\"found\", debugLabel, \"at\", address);\n return [];\n }\n\n if (deployedBytecodeSize != null) {\n if (deployedBytecodeSize === 0) {\n throw new Error(`Empty bytecode for ${debugLabel}`);\n }\n\n if (deployedBytecodeSize > contractSizeLimit) {\n console.warn(\n `\\nBytecode for ${debugLabel} (${deployedBytecodeSize} bytes) is over the contract size limit (${contractSizeLimit} bytes). Run \\`forge build --sizes\\` for more info.\\n`,\n );\n } else if (deployedBytecodeSize > contractSizeLimit * 0.95) {\n console.warn(\n // eslint-disable-next-line max-len\n `\\nBytecode for ${debugLabel} (${deployedBytecodeSize} bytes) is almost over the contract size limit (${contractSizeLimit} bytes). Run \\`forge build --sizes\\` for more info.\\n`,\n );\n }\n }\n\n debug(\"deploying\", debugLabel, \"at\", address);\n return [\n await sendTransaction(client, {\n chain: client.chain ?? null,\n to: deployerAddress,\n data: concatHex([salt, bytecode]),\n }),\n ];\n}\n","import { stringToHex } from \"viem\";\n\n// salt for deterministic deploys of singleton contracts\nexport const singletonSalt = stringToHex(\"\", { size: 32 });\n\n// https://eips.ethereum.org/EIPS/eip-170\nexport const contractSizeLimit = parseInt(\"6000\", 16);\n","import { debug as parentDebug } from \"../debug\";\n\nexport const debug = parentDebug.extend(\"deploy\");\nexport const error = parentDebug.extend(\"deploy\");\n\n// Pipe debug output to stdout instead of stderr\ndebug.log = console.debug.bind(console);\n\n// Pipe error output to stderr\nerror.log = console.error.bind(console);\n","import { Client, Transport, Chain, Account, Hex } from \"viem\";\nimport { Contract, ensureContract } from \"./ensureContract\";\nimport { waitForTransactions } from \"../waitForTransactions\";\nimport { uniqueBy } from \"../utils/uniqueBy\";\n\nexport async function ensureContractsDeployed({\n client,\n deployerAddress,\n contracts,\n}: {\n readonly client: Client<Transport, Chain | undefined, Account>;\n readonly deployerAddress: Hex;\n readonly contracts: readonly Contract[];\n}): Promise<readonly Hex[]> {\n // Deployments assume a deterministic deployer, so we only need to deploy the unique bytecode\n const uniqueContracts = uniqueBy(contracts, (contract) => contract.bytecode);\n\n const txs = (\n await Promise.all(uniqueContracts.map((contract) => ensureContract({ client, deployerAddress, ...contract })))\n ).flat();\n\n await waitForTransactions({\n client,\n hashes: txs,\n debugLabel: \"contract deploys\",\n });\n\n return txs;\n}\n","import { Account, Address, Chain, Client, Transport } from \"viem\";\nimport { getBalance, sendRawTransaction, sendTransaction, waitForTransactionReceipt } from \"viem/actions\";\nimport deployment from \"./create2/deployment.json\";\nimport { debug } from \"./debug\";\nimport { getDeployer } from \"./getDeployer\";\n\nconst deployer = `0x${deployment.address}` as const;\n\nexport async function ensureDeployer(client: Client<Transport, Chain | undefined, Account>): Promise<Address> {\n const existingDeployer = await getDeployer(client);\n if (existingDeployer !== undefined) {\n return existingDeployer;\n }\n\n // There's not really a way to simulate a pre-EIP-155 (no chain ID) transaction,\n // so we have to attempt to create the deployer first and, if it fails, fall back\n // to a regular deploy.\n\n // Send gas to deployment signer\n const gasRequired = BigInt(deployment.gasLimit) * BigInt(deployment.gasPrice);\n const currentBalance = await getBalance(client, { address: `0x${deployment.signerAddress}` });\n const gasNeeded = gasRequired - currentBalance;\n if (gasNeeded > 0) {\n debug(\"sending gas for CREATE2 deployer to signer at\", deployment.signerAddress);\n const gasTx = await sendTransaction(client, {\n chain: client.chain ?? null,\n to: `0x${deployment.signerAddress}`,\n value: gasNeeded,\n });\n const gasReceipt = await waitForTransactionReceipt(client, { hash: gasTx });\n if (gasReceipt.status !== \"success\") {\n console.error(\"failed to send gas to deployer signer\", gasReceipt);\n throw new Error(\"failed to send gas to deployer signer\");\n }\n }\n\n // Deploy the deployer\n debug(\"deploying CREATE2 deployer at\", deployer);\n const deployTx = await sendRawTransaction(client, { serializedTransaction: `0x${deployment.transaction}` }).catch(\n (error) => {\n // Do a regular contract create if the presigned transaction doesn't work due to replay protection\n if (String(error).includes(\"only replay-protected (EIP-155) transactions allowed over RPC\")) {\n console.warn(\n // eslint-disable-next-line max-len\n `\\n ⚠️ Your chain or RPC does not allow for non EIP-155 signed transactions, so your deploys will not be determinstic and contract addresses may change between deploys.\\n\\n We recommend running your chain's node with \\`--rpc.allow-unprotected-txs\\` to enable determinstic deployments.\\n`,\n );\n debug(\"deploying CREATE2 deployer\");\n return sendTransaction(client, {\n chain: client.chain ?? null,\n data: `0x${deployment.creationCode}`,\n });\n }\n throw error;\n },\n );\n\n const deployReceipt = await waitForTransactionReceipt(client, { hash: deployTx });\n if (!deployReceipt.contractAddress) {\n throw new Error(\"Deploy receipt did not have contract address, was the deployer not deployed?\");\n }\n\n if (deployReceipt.contractAddress !== deployer) {\n console.warn(\n `\\n ⚠️ CREATE2 deployer created at ${deployReceipt.contractAddress} does not match the CREATE2 determinstic deployer we expected (${deployer})`,\n );\n }\n\n return deployReceipt.contractAddress;\n}\n","{\n \"gasPrice\": 100000000000,\n \"gasLimit\": 100000,\n \"signerAddress\": \"3fab184622dc19b6109349b94811493bf2a45362\",\n \"transaction\": \"f8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222\",\n \"address\": \"4e59b44847b379578588920ca78fbf26c0b4956c\",\n \"creationCode\": \"604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3\"\n}\n","import { Address, Chain, Client, Transport, sliceHex } from \"viem\";\nimport { getCode } from \"viem/actions\";\nimport deployment from \"./create2/deployment.json\";\nimport { debug } from \"./debug\";\n\nconst deployer = `0x${deployment.address}` as const;\n\nexport async function getDeployer(client: Client<Transport, Chain | undefined>): Promise<Address | undefined> {\n const bytecode = await getCode(client, { address: deployer });\n if (bytecode) {\n debug(\"found deployer bytecode at\", deployer);\n // check if deployed bytecode is the same as the expected bytecode (minus 14-bytes creation code prefix)\n if (bytecode !== sliceHex(`0x${deployment.creationCode}`, 14)) {\n console.warn(\n `\\n ⚠️ Bytecode for deployer at ${deployer} did not match the expected CREATE2 bytecode. You may have unexpected results.\\n`,\n );\n }\n return deployer;\n }\n}\n","import { Hex, getCreate2Address } from \"viem\";\nimport { singletonSalt } from \"./common\";\n\nexport function getContractAddress({\n deployerAddress,\n bytecode,\n salt = singletonSalt,\n}: {\n readonly deployerAddress: Hex;\n readonly bytecode: Hex;\n readonly salt?: Hex;\n}): Hex {\n return getCreate2Address({ from: deployerAddress, bytecode, salt });\n}\n"],"mappings":";;;;;;;;;;;AAEA,SAAS,iCAAiC;AAE1C,eAAsB,oBAAoB;AAAA,EACxC;AAAA,EACA;AAAA,EACA,aAAa;AACf,GAIkB;AAChB,MAAI,CAAC,OAAO,OAAQ;AAEpB,QAAM,eAAe,UAAU,aAAa;AAE5C,aAAW,QAAQ,QAAQ;AACzB,UAAM,UAAU,MAAM,0BAA0B,QAAQ,EAAE,KAAK,CAAC;AAEhE,QAAI,QAAQ,WAAW,YAAY;AACjC,YAAM,IAAI,MAAM,yBAAyB,IAAI,EAAE;AAAA,IACjD;AAAA,EACF;AACF;;;ACxBA,SAA4C,WAAW,yBAA8B;AACrF,SAAS,eAAe;;;ACDxB,SAAS,mBAAmB;AAGrB,IAAM,gBAAgB,YAAY,IAAI,EAAE,MAAM,GAAG,CAAC;AAGlD,IAAM,oBAAo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,qBAAAK,0BAAyB;AAGhC,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,OAAO;AACT,GAIQ;AACN,SAAOC,mBAAkB,EAAE,MAAM,iBAAiB,UAAU,KAAK,CAAC;AACpE;","names":["debug","debug","sendTransaction","waitForTransactionReceipt","getCode","getCode","debug","deployer","debug","sendTransaction","waitForTransactionReceipt","error","getCreate2Address","getCreate2Address"]}
|
package/dist/utils.js
CHANGED
|
@@ -13,10 +13,12 @@ import {
|
|
|
13
13
|
iteratorToArray,
|
|
14
14
|
mapObject,
|
|
15
15
|
unique,
|
|
16
|
-
uniqueBy,
|
|
17
16
|
wait,
|
|
18
17
|
waitForIdle
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NFWCLD5I.js";
|
|
19
|
+
import {
|
|
20
|
+
uniqueBy
|
|
21
|
+
} from "./chunk-CHXZROA7.js";
|
|
20
22
|
export {
|
|
21
23
|
assertExhaustive,
|
|
22
24
|
bigIntMax,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latticexyz/common",
|
|
3
|
-
"version": "2.2.22-
|
|
3
|
+
"version": "2.2.22-bc95ea094386f235971f1c5b98a34f41c161999d",
|
|
4
4
|
"description": "Common low level logic shared between packages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"p-retry": "^5.1.2",
|
|
70
70
|
"prettier": "3.2.5",
|
|
71
71
|
"prettier-plugin-solidity": "1.3.1",
|
|
72
|
-
"@latticexyz/schema-type": "2.2.22-
|
|
72
|
+
"@latticexyz/schema-type": "2.2.22-bc95ea094386f235971f1c5b98a34f41c161999d"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/debug": "^4.1.7",
|
|
76
|
-
"viem": "2.
|
|
76
|
+
"viem": "2.30.5"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"@aws-sdk/client-kms": "3.x",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/assertExhaustive.ts","../src/utils/bigIntMax.ts","../src/utils/bigIntMin.ts","../src/utils/bigIntSort.ts","../src/utils/chunk.ts","../src/utils/groupBy.ts","../src/utils/identity.ts","../src/utils/includes.ts","../src/utils/indent.ts","../src/utils/isDefined.ts","../src/utils/isNotNull.ts","../src/utils/iteratorToArray.ts","../src/utils/mapObject.ts","../src/utils/unique.ts","../src/utils/uniqueBy.ts","../src/utils/wait.ts","../src/utils/waitForIdle.ts"],"sourcesContent":["export function assertExhaustive(value: never, message?: string): never {\n throw new Error(message ?? `Unexpected value: ${value}`);\n}\n","export function bigIntMax(...args: bigint[]): bigint {\n return args.reduce((m, e) => (e > m ? e : m));\n}\n","export function bigIntMin(...args: bigint[]): bigint {\n return args.reduce((m, e) => (e < m ? e : m));\n}\n","export function bigIntSort(a: bigint, b: bigint): -1 | 0 | 1 {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","export function* chunk<T>(arr: readonly T[], n: number): Generator<readonly T[], void> {\n for (let i = 0; i < arr.length; i += n) {\n yield arr.slice(i, i + n);\n }\n}\n","export function groupBy<value, key>(\n values: readonly value[],\n getKey: (value: value) => key,\n): Map<key, readonly value[]> {\n const map = new Map<key, readonly value[]>();\n for (const value of values) {\n const key = getKey(value);\n if (!map.has(key)) map.set(key, []);\n (map.get(key) as value[]).push(value);\n }\n return map;\n}\n","export function identity<T>(value: T): T {\n return value;\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function includes<item>(items: item[], value: any): value is item {\n return items.includes(value);\n}\n","export function indent(message: string, indentation = \" \"): string {\n return message.replaceAll(/(^|\\n)/g, `$1${indentation}`);\n}\n","export function isDefined<T>(argument: T | undefined): argument is T {\n return argument !== undefined;\n}\n","export function isNotNull<T>(argument: T | null): argument is T {\n return argument !== null;\n}\n","export async function iteratorToArray<T>(iterator: AsyncIterable<T>): Promise<readonly T[]> {\n const items: T[] = [];\n for await (const item of iterator) {\n items.push(item);\n }\n return items;\n}\n","/**\n * Map each key of a source object via a given valueMap function\n */\nexport function mapObject<\n Source extends Record<string | number | symbol, unknown>,\n Target extends { [key in keyof Source]: unknown },\n>(source: Source, valueMap: (value: Source[typeof key], key: keyof Source) => Target[typeof key]): Target {\n return Object.fromEntries(\n Object.entries(source).map(([key, value]) => [key, valueMap(value as Source[keyof Source], key)]),\n ) as Target;\n}\n","export function unique<value>(values: readonly value[]): readonly value[] {\n return Array.from(new Set(values));\n}\n","export function uniqueBy<value, key>(values: readonly value[], getKey: (value: value) => key): readonly value[] {\n const map = new Map<key, value>();\n for (const value of values) {\n const key = getKey(value);\n if (!map.has(key)) {\n map.set(key, value);\n }\n }\n return Array.from(map.values());\n}\n","export function wait(ms: number): Promise<void> {\n return new Promise<void>((resolve) => setTimeout(() => resolve(), ms));\n}\n","export function waitForIdle(): Promise<void> {\n return new Promise<void>((resolve) => {\n if (typeof requestIdleCallback !== \"undefined\") {\n requestIdleCallback(() => resolve());\n } else {\n setTimeout(() => resolve(), 1);\n }\n });\n}\n"],"mappings":";AAAO,SAAS,iBAAiB,OAAc,SAAyB;AACtE,QAAM,IAAI,MAAM,WAAW,qBAAqB,KAAK,EAAE;AACzD;;;ACFO,SAAS,aAAa,MAAwB;AACnD,SAAO,KAAK,OAAO,CAAC,GAAG,MAAO,IAAI,IAAI,IAAI,CAAE;AAC9C;;;ACFO,SAAS,aAAa,MAAwB;AACnD,SAAO,KAAK,OAAO,CAAC,GAAG,MAAO,IAAI,IAAI,IAAI,CAAE;AAC9C;;;ACFO,SAAS,WAAW,GAAW,GAAuB;AAC3D,SAAO,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI;AAClC;;;ACFO,UAAU,MAAS,KAAmB,GAA0C;AACrF,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK,GAAG;AACtC,UAAM,IAAI,MAAM,GAAG,IAAI,CAA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