@metamask/transaction-controller 57.3.0 → 58.0.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/TransactionController.cjs +97 -34
  3. package/dist/TransactionController.cjs.map +1 -1
  4. package/dist/TransactionController.d.cts +17 -3
  5. package/dist/TransactionController.d.cts.map +1 -1
  6. package/dist/TransactionController.d.mts +17 -3
  7. package/dist/TransactionController.d.mts.map +1 -1
  8. package/dist/TransactionController.mjs +97 -34
  9. package/dist/TransactionController.mjs.map +1 -1
  10. package/dist/api/simulation-api.cjs +28 -2
  11. package/dist/api/simulation-api.cjs.map +1 -1
  12. package/dist/api/simulation-api.d.cts.map +1 -1
  13. package/dist/api/simulation-api.d.mts.map +1 -1
  14. package/dist/api/simulation-api.mjs +29 -2
  15. package/dist/api/simulation-api.mjs.map +1 -1
  16. package/dist/constants.cjs +5 -1
  17. package/dist/constants.cjs.map +1 -1
  18. package/dist/constants.d.cts +2 -0
  19. package/dist/constants.d.cts.map +1 -1
  20. package/dist/constants.d.mts +2 -0
  21. package/dist/constants.d.mts.map +1 -1
  22. package/dist/constants.mjs +4 -0
  23. package/dist/constants.mjs.map +1 -1
  24. package/dist/index.cjs +2 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +3 -3
  27. package/dist/index.d.cts.map +1 -1
  28. package/dist/index.d.mts +3 -3
  29. package/dist/index.d.mts.map +1 -1
  30. package/dist/index.mjs +1 -1
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/types.cjs +6 -1
  33. package/dist/types.cjs.map +1 -1
  34. package/dist/types.d.cts +32 -0
  35. package/dist/types.d.cts.map +1 -1
  36. package/dist/types.d.mts +32 -0
  37. package/dist/types.d.mts.map +1 -1
  38. package/dist/types.mjs +5 -0
  39. package/dist/types.mjs.map +1 -1
  40. package/dist/utils/batch.cjs +46 -21
  41. package/dist/utils/batch.cjs.map +1 -1
  42. package/dist/utils/batch.d.cts +5 -3
  43. package/dist/utils/batch.d.cts.map +1 -1
  44. package/dist/utils/batch.d.mts +5 -3
  45. package/dist/utils/batch.d.mts.map +1 -1
  46. package/dist/utils/batch.mjs +48 -23
  47. package/dist/utils/batch.mjs.map +1 -1
  48. package/dist/utils/gas.cjs +11 -1
  49. package/dist/utils/gas.cjs.map +1 -1
  50. package/dist/utils/gas.d.cts +3 -1
  51. package/dist/utils/gas.d.cts.map +1 -1
  52. package/dist/utils/gas.d.mts +3 -1
  53. package/dist/utils/gas.d.mts.map +1 -1
  54. package/dist/utils/gas.mjs +11 -1
  55. package/dist/utils/gas.mjs.map +1 -1
  56. package/package.json +7 -7
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.simulateTransactions = void 0;
4
4
  const controller_utils_1 = require("@metamask/controller-utils");
5
5
  const utils_1 = require("@metamask/utils");
6
+ const lodash_1 = require("lodash");
7
+ const constants_1 = require("../constants.cjs");
6
8
  const errors_1 = require("../errors.cjs");
7
9
  const logger_1 = require("../logger.cjs");
8
10
  const log = (0, utils_1.createModuleLogger)(logger_1.projectLogger, 'simulation-api');
@@ -19,16 +21,17 @@ let requestIdCounter = 0;
19
21
  */
20
22
  async function simulateTransactions(chainId, request) {
21
23
  const url = await getSimulationUrl(chainId);
22
- log('Sending request', url, request);
23
24
  const requestId = requestIdCounter;
24
25
  requestIdCounter += 1;
26
+ const finalRequest = finalizeRequest(request);
27
+ log('Sending request', url, request);
25
28
  const response = await fetch(url, {
26
29
  method: 'POST',
27
30
  body: JSON.stringify({
28
31
  id: String(requestId),
29
32
  jsonrpc: '2.0',
30
33
  method: RPC_METHOD,
31
- params: [request],
34
+ params: [finalRequest],
32
35
  }),
33
36
  });
34
37
  const responseJson = await response.json();
@@ -75,4 +78,27 @@ async function getNetworkData() {
75
78
  function getUrl(subdomain) {
76
79
  return BASE_URL.replace('{0}', subdomain);
77
80
  }
81
+ /**
82
+ * Finalize the simulation request.
83
+ * Overrides the DelegationManager code to remove signature errors.
84
+ * Temporary pending support in the simulation API.
85
+ *
86
+ * @param request - The simulation request to finalize.
87
+ * @returns The finalized simulation request.
88
+ */
89
+ function finalizeRequest(request) {
90
+ const newRequest = (0, lodash_1.cloneDeep)(request);
91
+ for (const transaction of newRequest.transactions) {
92
+ const normalizedTo = transaction.to?.toLowerCase();
93
+ const isToDelegationManager = constants_1.DELEGATION_MANAGER_ADDRESSES.includes(normalizedTo);
94
+ if (!isToDelegationManager) {
95
+ continue;
96
+ }
97
+ newRequest.overrides = newRequest.overrides || {};
98
+ newRequest.overrides[normalizedTo] = {
99
+ code: constants_1.CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,
100
+ };
101
+ }
102
+ return newRequest;
103
+ }
78
104
  //# sourceMappingURL=simulation-api.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"simulation-api.cjs","sourceRoot":"","sources":["../../src/api/simulation-api.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,2CAA+D;AAE/D,0CAA8E;AAC9E,0CAA0C;AAE1C,MAAM,GAAG,GAAG,IAAA,0BAAkB,EAAC,sBAAa,EAAE,gBAAgB,CAAC,CAAC;AAEhE,MAAM,UAAU,GAAG,6BAA6B,CAAC;AACjD,MAAM,QAAQ,GAAG,6CAA6C,CAAC;AAC/D,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAgPrC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CACxC,OAAY,EACZ,OAA0B;IAE1B,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE5C,GAAG,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAErC,MAAM,SAAS,GAAG,gBAAgB,CAAC;IACnC,gBAAgB,IAAI,CAAC,CAAC;IAEtB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,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EAAE,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,SAAS,MAAM,CAAC,SAAiB;IAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport { createModuleLogger, type Hex } from '@metamask/utils';\n\nimport { SimulationChainNotSupportedError, SimulationError } from '../errors';\nimport { projectLogger } from '../logger';\n\nconst log = createModuleLogger(projectLogger, 'simulation-api');\n\nconst RPC_METHOD = 'infura_simulateTransactions';\nconst BASE_URL = 'https://tx-sentinel-{0}.api.cx.metamask.io/';\nconst ENDPOINT_NETWORKS = 'networks';\n\n/** Single transaction to simulate in a simulation API request. */\nexport type SimulationRequestTransaction = {\n authorizationList?: {\n /** Address of a smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n }[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/** Request to the simulation API to simulate transactions. */\nexport type SimulationRequest = {\n blockOverrides?: {\n time?: Hex;\n };\n\n /**\n * Overrides to the state of the blockchain, keyed by address.\n */\n overrides?: {\n [address: Hex]: {\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n };\n\n /**\n * Whether to include available token fees.\n */\n suggestFees?: {\n /* Whether to estimate gas for the transaction being submitted via a delegation. */\n with7702?: boolean;\n\n /* Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /* Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated.\n * State changes impact subsequent transactions in the list.\n */\n transactions: SimulationRequestTransaction[];\n\n /**\n * Whether to include call traces in the response.\n * Defaults to false.\n */\n withCallTrace?: boolean;\n\n /**\n * Whether to include the default block data in the simulation.\n * Defaults to false.\n */\n withDefaultBlockOverrides?: boolean;\n\n /**\n * Whether to use the gas fees in the simulation.\n * Defaults to false.\n */\n withGas?: boolean;\n\n /**\n * Whether to include event logs in the response.\n * Defaults to false.\n */\n withLogs?: boolean;\n};\n\n/** Raw event log emitted by a simulated transaction. */\nexport type SimulationResponseLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/** Call trace of a single simulated transaction. */\nexport type SimulationResponseCallTrace = {\n /** Nested calls. */\n calls: SimulationResponseCallTrace[];\n\n /** Raw event logs created by the call. */\n logs: SimulationResponseLog[];\n};\n\n/**\n * Changes to the blockchain state.\n * Keyed by account address.\n */\nexport type SimulationResponseStateDiff = {\n [address: Hex]: {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\nexport type SimulationResponseTokenFee = {\n /** Token data independent of current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Decimals of the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of sender. */\n currentBalanceToken: Hex;\n\n /** Account address that token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversation rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Estimated gas limit required for fee transfer. */\n transferEstimate: Hex;\n};\n\n/** Response from the simulation API for a single transaction. */\nexport type SimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SimulationResponseCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction. */\n fees?: {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee data for the fee level. */\n tokenFees: SimulationResponseTokenFee[];\n }[];\n\n /**\n * Estimated total gas cost of the transaction.\n * Included in the stateDiff if `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction, such as the balance if calling balanceOf. */\n return: Hex;\n\n /** Changes to the blockchain state. */\n stateDiff?: {\n /** Initial blockchain state before the transaction. */\n pre?: SimulationResponseStateDiff;\n\n /** Updated blockchain state after the transaction. */\n post?: SimulationResponseStateDiff;\n };\n};\n\n/** Response from the simulation API. */\nexport type SimulationResponse = {\n /** Simulation data for each transaction in the request. */\n transactions: SimulationResponseTransaction[];\n};\n\n/** Data for a network supported by the Simulation API. */\ntype SimulationNetwork = {\n /** Subdomain of the API for the network. */\n network: string;\n\n /** Whether the network supports confirmation simulations. */\n confirmations: boolean;\n};\n\n/** Response from the simulation API containing supported networks. */\ntype SimulationNetworkResponse = {\n [chainIdDecimal: string]: SimulationNetwork;\n};\n\nlet requestIdCounter = 0;\n\n/**\n * Simulate transactions using the transaction simulation API.\n *\n * @param chainId - The chain ID to simulate transactions on.\n * @param request - The request to simulate transactions.\n * @returns The response from the simulation API.\n */\nexport async function simulateTransactions(\n chainId: Hex,\n request: SimulationRequest,\n): Promise<SimulationResponse> {\n const url = await getSimulationUrl(chainId);\n\n log('Sending request', url, request);\n\n const requestId = requestIdCounter;\n requestIdCounter += 1;\n\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n id: String(requestId),\n jsonrpc: '2.0',\n method: RPC_METHOD,\n params: [request],\n }),\n });\n\n const responseJson = await response.json();\n\n log('Received response', responseJson);\n\n if (responseJson.error) {\n const { code, message } = responseJson.error;\n throw new SimulationError(message, code);\n }\n\n return responseJson?.result;\n}\n\n/**\n * Get the URL for the transaction simulation API.\n *\n * @param chainId - The chain ID to get the URL for.\n * @returns The URL for the transaction simulation API.\n */\nasync function getSimulationUrl(chainId: Hex): Promise<string> {\n const networkData = await getNetworkData();\n const chainIdDecimal = convertHexToDecimal(chainId);\n const network = networkData[chainIdDecimal];\n\n if (!network?.confirmations) {\n log('Chain is not supported', chainId);\n throw new SimulationChainNotSupportedError(chainId);\n }\n\n return getUrl(network.network);\n}\n\n/**\n * Retrieve the supported network data from the simulation API.\n *\n * @returns The network data response from the simulation API.\n */\nasync function getNetworkData(): Promise<SimulationNetworkResponse> {\n const url = `${getUrl('ethereum-mainnet')}${ENDPOINT_NETWORKS}`;\n const response = await fetch(url);\n return response.json();\n}\n\n/**\n * Generate the URL for the specified subdomain in the simulation API.\n *\n * @param subdomain - The subdomain to generate the URL for.\n * @returns The URL for the transaction simulation API.\n */\nfunction getUrl(subdomain: string): string {\n return BASE_URL.replace('{0}', subdomain);\n}\n"]}
1
+ {"version":3,"file":"simulation-api.cjs","sourceRoot":"","sources":["../../src/api/simulation-api.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,2CAA+D;AAC/D,mCAAmC;AAEnC,gDAGsB;AACtB,0CAA8E;AAC9E,0CAA0C;AAE1C,MAAM,GAAG,GAAG,IAAA,0BAAkB,EAAC,sBAAa,EAAE,gBAAgB,CAAC,CAAC;AAEhE,MAAM,UAAU,GAAG,6BAA6B,CAAC;AACjD,MAAM,QAAQ,GAAG,6CAA6C,CAAC;AAC/D,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAgPrC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CACxC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,IAAI,yCAAgC,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,cAAc;IAC3B,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,iBAAiB,EAAE,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,SAAS,MAAM,CAAC,SAAiB;IAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,OAA0B;IACjD,MAAM,UAAU,GAAG,IAAA,kBAAS,EAAC,OAAO,CAAC,CAAC;IAEtC,KAAK,MAAM,WAAW,IAAI,UAAU,CAAC,YAAY,EAAE;QACjD,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,EAAE,WAAW,EAAS,CAAC;QAE1D,MAAM,qBAAqB,GACzB,wCAA4B,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEtD,IAAI,CAAC,qBAAqB,EAAE;YAC1B,SAAS;SACV;QAED,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,EAAE,CAAC;QAElD,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG;YACnC,IAAI,EAAE,uDAA2C;SAClD,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport { createModuleLogger, type Hex } from '@metamask/utils';\nimport { cloneDeep } from 'lodash';\n\nimport {\n CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,\n DELEGATION_MANAGER_ADDRESSES,\n} from '../constants';\nimport { SimulationChainNotSupportedError, SimulationError } from '../errors';\nimport { projectLogger } from '../logger';\n\nconst log = createModuleLogger(projectLogger, 'simulation-api');\n\nconst RPC_METHOD = 'infura_simulateTransactions';\nconst BASE_URL = 'https://tx-sentinel-{0}.api.cx.metamask.io/';\nconst ENDPOINT_NETWORKS = 'networks';\n\n/** Single transaction to simulate in a simulation API request. */\nexport type SimulationRequestTransaction = {\n authorizationList?: {\n /** Address of a smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n }[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/** Request to the simulation API to simulate transactions. */\nexport type SimulationRequest = {\n blockOverrides?: {\n time?: Hex;\n };\n\n /**\n * Overrides to the state of the blockchain, keyed by address.\n */\n overrides?: {\n [address: Hex]: {\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n };\n\n /**\n * Whether to include available token fees.\n */\n suggestFees?: {\n /* Whether to estimate gas for the transaction being submitted via a delegation. */\n with7702?: boolean;\n\n /* Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /* Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated.\n * State changes impact subsequent transactions in the list.\n */\n transactions: SimulationRequestTransaction[];\n\n /**\n * Whether to include call traces in the response.\n * Defaults to false.\n */\n withCallTrace?: boolean;\n\n /**\n * Whether to include the default block data in the simulation.\n * Defaults to false.\n */\n withDefaultBlockOverrides?: boolean;\n\n /**\n * Whether to use the gas fees in the simulation.\n * Defaults to false.\n */\n withGas?: boolean;\n\n /**\n * Whether to include event logs in the response.\n * Defaults to false.\n */\n withLogs?: boolean;\n};\n\n/** Raw event log emitted by a simulated transaction. */\nexport type SimulationResponseLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/** Call trace of a single simulated transaction. */\nexport type SimulationResponseCallTrace = {\n /** Nested calls. */\n calls: SimulationResponseCallTrace[];\n\n /** Raw event logs created by the call. */\n logs: SimulationResponseLog[];\n};\n\n/**\n * Changes to the blockchain state.\n * Keyed by account address.\n */\nexport type SimulationResponseStateDiff = {\n [address: Hex]: {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\nexport type SimulationResponseTokenFee = {\n /** Token data independent of current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Decimals of the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of sender. */\n currentBalanceToken: Hex;\n\n /** Account address that token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversation rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Estimated gas limit required for fee transfer. */\n transferEstimate: Hex;\n};\n\n/** Response from the simulation API for a single transaction. */\nexport type SimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SimulationResponseCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction. */\n fees?: {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee data for the fee level. */\n tokenFees: SimulationResponseTokenFee[];\n }[];\n\n /**\n * Estimated total gas cost of the transaction.\n * Included in the stateDiff if `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction, such as the balance if calling balanceOf. */\n return: Hex;\n\n /** Changes to the blockchain state. */\n stateDiff?: {\n /** Initial blockchain state before the transaction. */\n pre?: SimulationResponseStateDiff;\n\n /** Updated blockchain state after the transaction. */\n post?: SimulationResponseStateDiff;\n };\n};\n\n/** Response from the simulation API. */\nexport type SimulationResponse = {\n /** Simulation data for each transaction in the request. */\n transactions: SimulationResponseTransaction[];\n};\n\n/** Data for a network supported by the Simulation API. */\ntype SimulationNetwork = {\n /** Subdomain of the API for the network. */\n network: string;\n\n /** Whether the network supports confirmation simulations. */\n confirmations: boolean;\n};\n\n/** Response from the simulation API containing supported networks. */\ntype SimulationNetworkResponse = {\n [chainIdDecimal: string]: SimulationNetwork;\n};\n\nlet requestIdCounter = 0;\n\n/**\n * Simulate transactions using the transaction simulation API.\n *\n * @param chainId - The chain ID to simulate transactions on.\n * @param request - The request to simulate transactions.\n * @returns The response from the simulation API.\n */\nexport async function simulateTransactions(\n chainId: Hex,\n request: SimulationRequest,\n): Promise<SimulationResponse> {\n const url = await getSimulationUrl(chainId);\n\n const requestId = requestIdCounter;\n requestIdCounter += 1;\n\n const finalRequest = finalizeRequest(request);\n\n log('Sending request', url, request);\n\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n id: String(requestId),\n jsonrpc: '2.0',\n method: RPC_METHOD,\n params: [finalRequest],\n }),\n });\n\n const responseJson = await response.json();\n\n log('Received response', responseJson);\n\n if (responseJson.error) {\n const { code, message } = responseJson.error;\n throw new SimulationError(message, code);\n }\n\n return responseJson?.result;\n}\n\n/**\n * Get the URL for the transaction simulation API.\n *\n * @param chainId - The chain ID to get the URL for.\n * @returns The URL for the transaction simulation API.\n */\nasync function getSimulationUrl(chainId: Hex): Promise<string> {\n const networkData = await getNetworkData();\n const chainIdDecimal = convertHexToDecimal(chainId);\n const network = networkData[chainIdDecimal];\n\n if (!network?.confirmations) {\n log('Chain is not supported', chainId);\n throw new SimulationChainNotSupportedError(chainId);\n }\n\n return getUrl(network.network);\n}\n\n/**\n * Retrieve the supported network data from the simulation API.\n *\n * @returns The network data response from the simulation API.\n */\nasync function getNetworkData(): Promise<SimulationNetworkResponse> {\n const url = `${getUrl('ethereum-mainnet')}${ENDPOINT_NETWORKS}`;\n const response = await fetch(url);\n return response.json();\n}\n\n/**\n * Generate the URL for the specified subdomain in the simulation API.\n *\n * @param subdomain - The subdomain to generate the URL for.\n * @returns The URL for the transaction simulation API.\n */\nfunction getUrl(subdomain: string): string {\n return BASE_URL.replace('{0}', subdomain);\n}\n\n/**\n * Finalize the simulation request.\n * Overrides the DelegationManager code to remove signature errors.\n * Temporary pending support in the simulation API.\n *\n * @param request - The simulation request to finalize.\n * @returns The finalized simulation request.\n */\nfunction finalizeRequest(request: SimulationRequest): SimulationRequest {\n const newRequest = cloneDeep(request);\n\n for (const transaction of newRequest.transactions) {\n const normalizedTo = transaction.to?.toLowerCase() as Hex;\n\n const isToDelegationManager =\n DELEGATION_MANAGER_ADDRESSES.includes(normalizedTo);\n\n if (!isToDelegationManager) {\n continue;\n }\n\n newRequest.overrides = newRequest.overrides || {};\n\n newRequest.overrides[normalizedTo] = {\n code: CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,\n };\n }\n\n return newRequest;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"simulation-api.d.cts","sourceRoot":"","sources":["../../src/api/simulation-api.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,GAAG,EAAE,wBAAwB;AAW/D,mEAAmE;AACnE,MAAM,MAAM,4BAA4B,GAAG;IACzC,iBAAiB,CAAC,EAAE;QAClB,oEAAoE;QACpE,O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,CAAC;IAEf,gDAAgD;IAChD,IAAI,CAAC,EAAE;QACL,mCAAmC;QACnC,GAAG,EAAE,GAAG,CAAC;QAET,6CAA6C;QAC7C,YAAY,EAAE,GAAG,CAAC;QAElB,sDAAsD;QACtD,oBAAoB,EAAE,GAAG,CAAC;QAE1B,wCAAwC;QACxC,SAAS,EAAE,0BAA0B,EAAE,CAAC;KACzC,EAAE,CAAC;IAEJ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,GAAG,CAAC;IAEf,yCAAyC;IACzC,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,iFAAiF;IACjF,MAAM,EAAE,GAAG,CAAC;IAEZ,uCAAuC;IACvC,SAAS,CAAC,EAAE;QACV,uDAAuD;QACvD,GAAG,CAAC,EAAE,2BAA2B,CAAC;QAElC,sDAAsD;QACtD,IAAI,CAAC,EAAE,2BAA2B,CAAC;KACpC,CAAC;CACH,CAAC;AAEF,wCAAwC;AACxC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,2DAA2D;IAC3D,YAAY,EAAE,6BAA6B,EAAE,CAAC;CAC/C,CAAC;AAkBF;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CA8B7B"}
@@ -1,5 +1,8 @@
1
1
  import { convertHexToDecimal } from "@metamask/controller-utils";
2
2
  import { createModuleLogger } from "@metamask/utils";
3
+ import $lodash from "lodash";
4
+ const { cloneDeep } = $lodash;
5
+ import { CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS, DELEGATION_MANAGER_ADDRESSES } from "../constants.mjs";
3
6
  import { SimulationChainNotSupportedError, SimulationError } from "../errors.mjs";
4
7
  import { projectLogger } from "../logger.mjs";
5
8
  const log = createModuleLogger(projectLogger, 'simulation-api');
@@ -16,16 +19,17 @@ let requestIdCounter = 0;
16
19
  */
17
20
  export async function simulateTransactions(chainId, request) {
18
21
  const url = await getSimulationUrl(chainId);
19
- log('Sending request', url, request);
20
22
  const requestId = requestIdCounter;
21
23
  requestIdCounter += 1;
24
+ const finalRequest = finalizeRequest(request);
25
+ log('Sending request', url, request);
22
26
  const response = await fetch(url, {
23
27
  method: 'POST',
24
28
  body: JSON.stringify({
25
29
  id: String(requestId),
26
30
  jsonrpc: '2.0',
27
31
  method: RPC_METHOD,
28
- params: [request],
32
+ params: [finalRequest],
29
33
  }),
30
34
  });
31
35
  const responseJson = await response.json();
@@ -71,4 +75,27 @@ async function getNetworkData() {
71
75
  function getUrl(subdomain) {
72
76
  return BASE_URL.replace('{0}', subdomain);
73
77
  }
78
+ /**
79
+ * Finalize the simulation request.
80
+ * Overrides the DelegationManager code to remove signature errors.
81
+ * Temporary pending support in the simulation API.
82
+ *
83
+ * @param request - The simulation request to finalize.
84
+ * @returns The finalized simulation request.
85
+ */
86
+ function finalizeRequest(request) {
87
+ const newRequest = cloneDeep(request);
88
+ for (const transaction of newRequest.transactions) {
89
+ const normalizedTo = transaction.to?.toLowerCase();
90
+ const isToDelegationManager = DELEGATION_MANAGER_ADDRESSES.includes(normalizedTo);
91
+ if (!isToDelegationManager) {
92
+ continue;
93
+ }
94
+ newRequest.overrides = newRequest.overrides || {};
95
+ newRequest.overrides[normalizedTo] = {
96
+ code: CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,
97
+ };
98
+ }
99
+ return newRequest;
100
+ }
74
101
  //# sourceMappingURL=simulation-api.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"simulation-api.mjs","sourceRoot":"","sources":["../../src/api/simulation-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC;AACjE,OAAO,EAAE,kBAAkB,EAAY,wBAAwB;AAE/D,OAAO,EAAE,gCAAgC,EAAE,eAAe,EAAE,sBAAkB;AAC9E,OAAO,EAAE,aAAa,EAAE,sBAAkB;A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3C,MAAM,cAAc,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;IAE5C,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE;QAC3B,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;QACvC,MAAM,IAAI,gCAAgC,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,KAAK,UAAU,cAAc;IAC3B,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,iBAAiB,EAAE,CAAC;IAChE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED;;;;;GAKG;AACH,SAAS,MAAM,CAAC,SAAiB;IAC/B,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport { createModuleLogger, type Hex } from '@metamask/utils';\n\nimport { SimulationChainNotSupportedError, SimulationError } from '../errors';\nimport { projectLogger } from '../logger';\n\nconst log = createModuleLogger(projectLogger, 'simulation-api');\n\nconst RPC_METHOD = 'infura_simulateTransactions';\nconst BASE_URL = 'https://tx-sentinel-{0}.api.cx.metamask.io/';\nconst ENDPOINT_NETWORKS = 'networks';\n\n/** Single transaction to simulate in a simulation API request. */\nexport type SimulationRequestTransaction = {\n authorizationList?: {\n /** Address of a smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n }[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/** Request to the simulation API to simulate transactions. */\nexport type SimulationRequest = {\n blockOverrides?: {\n time?: Hex;\n };\n\n /**\n * Overrides to the state of the blockchain, keyed by address.\n */\n overrides?: {\n [address: Hex]: {\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n };\n\n /**\n * Whether to include available token fees.\n */\n suggestFees?: {\n /* Whether to estimate gas for the transaction being submitted via a delegation. */\n with7702?: boolean;\n\n /* Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /* Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated.\n * State changes impact subsequent transactions in the list.\n */\n transactions: SimulationRequestTransaction[];\n\n /**\n * Whether to include call traces in the response.\n * Defaults to false.\n */\n withCallTrace?: boolean;\n\n /**\n * Whether to include the default block data in the simulation.\n * Defaults to false.\n */\n withDefaultBlockOverrides?: boolean;\n\n /**\n * Whether to use the gas fees in the simulation.\n * Defaults to false.\n */\n withGas?: boolean;\n\n /**\n * Whether to include event logs in the response.\n * Defaults to false.\n */\n withLogs?: boolean;\n};\n\n/** Raw event log emitted by a simulated transaction. */\nexport type SimulationResponseLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/** Call trace of a single simulated transaction. */\nexport type SimulationResponseCallTrace = {\n /** Nested calls. */\n calls: SimulationResponseCallTrace[];\n\n /** Raw event logs created by the call. */\n logs: SimulationResponseLog[];\n};\n\n/**\n * Changes to the blockchain state.\n * Keyed by account address.\n */\nexport type SimulationResponseStateDiff = {\n [address: Hex]: {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\nexport type SimulationResponseTokenFee = {\n /** Token data independent of current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Decimals of the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of sender. */\n currentBalanceToken: Hex;\n\n /** Account address that token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversation rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Estimated gas limit required for fee transfer. */\n transferEstimate: Hex;\n};\n\n/** Response from the simulation API for a single transaction. */\nexport type SimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SimulationResponseCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction. */\n fees?: {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee data for the fee level. */\n tokenFees: SimulationResponseTokenFee[];\n }[];\n\n /**\n * Estimated total gas cost of the transaction.\n * Included in the stateDiff if `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction, such as the balance if calling balanceOf. */\n return: Hex;\n\n /** Changes to the blockchain state. */\n stateDiff?: {\n /** Initial blockchain state before the transaction. */\n pre?: SimulationResponseStateDiff;\n\n /** Updated blockchain state after the transaction. */\n post?: SimulationResponseStateDiff;\n };\n};\n\n/** Response from the simulation API. */\nexport type SimulationResponse = {\n /** Simulation data for each transaction in the request. */\n transactions: SimulationResponseTransaction[];\n};\n\n/** Data for a network supported by the Simulation API. */\ntype SimulationNetwork = {\n /** Subdomain of the API for the network. */\n network: string;\n\n /** Whether the network supports confirmation simulations. */\n confirmations: boolean;\n};\n\n/** Response from the simulation API containing supported networks. */\ntype SimulationNetworkResponse = {\n [chainIdDecimal: string]: SimulationNetwork;\n};\n\nlet requestIdCounter = 0;\n\n/**\n * Simulate transactions using the transaction simulation API.\n *\n * @param chainId - The chain ID to simulate transactions on.\n * @param request - The request to simulate transactions.\n * @returns The response from the simulation API.\n */\nexport async function simulateTransactions(\n chainId: Hex,\n request: SimulationRequest,\n): Promise<SimulationResponse> {\n const url = await getSimulationUrl(chainId);\n\n log('Sending request', url, request);\n\n const requestId = requestIdCounter;\n requestIdCounter += 1;\n\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n id: String(requestId),\n jsonrpc: '2.0',\n method: RPC_METHOD,\n params: [request],\n }),\n });\n\n const responseJson = await response.json();\n\n log('Received response', responseJson);\n\n if (responseJson.error) {\n const { code, message } = responseJson.error;\n throw new SimulationError(message, code);\n }\n\n return responseJson?.result;\n}\n\n/**\n * Get the URL for the transaction simulation API.\n *\n * @param chainId - The chain ID to get the URL for.\n * @returns The URL for the transaction simulation API.\n */\nasync function getSimulationUrl(chainId: Hex): Promise<string> {\n const networkData = await getNetworkData();\n const chainIdDecimal = convertHexToDecimal(chainId);\n const network = networkData[chainIdDecimal];\n\n if (!network?.confirmations) {\n log('Chain is not supported', chainId);\n throw new SimulationChainNotSupportedError(chainId);\n }\n\n return getUrl(network.network);\n}\n\n/**\n * Retrieve the supported network data from the simulation API.\n *\n * @returns The network data response from the simulation API.\n */\nasync function getNetworkData(): Promise<SimulationNetworkResponse> {\n const url = `${getUrl('ethereum-mainnet')}${ENDPOINT_NETWORKS}`;\n const response = await fetch(url);\n return response.json();\n}\n\n/**\n * Generate the URL for the specified subdomain in the simulation API.\n *\n * @param subdomain - The subdomain to generate the URL for.\n * @returns The URL for the transaction simulation API.\n */\nfunction getUrl(subdomain: string): string {\n return BASE_URL.replace('{0}', subdomain);\n}\n"]}
1
+ {"version":3,"file":"simulation-api.mjs","sourceRoot":"","sources":["../../src/api/simulation-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mCAAmC;AACjE,OAAO,EAAE,kBAAkB,EAAY,wBAAwB;;;AAG/D,OAAO,EACL,2CAA2C,EAC3C,4BAA4B,EAC7B,yBAAqB;AACtB,OAAO,EAAE,gCAAgC,EAAE,eAAe,EAAE,sBAAkB;AAC9E,OAAO,EAAE,aAAa,EAAE,sBAAkB;AAE1C,MAAM,GAAG,GAAG,kBAAkB,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;AAEhE,MAAM,UAAU,GAAG,6BAA6B,CAAC;AACjD,MAAM,QAAQ,GAAG,6CAA6C,CAAC;AAC/D,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAgPrC,IAAI,gBAAgB,GAAG,CAAC,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAY,EACZ,OAA0B;IAE1B,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,gBAAgB,CAAC;IACnC,gBAAgB,IAAI,CAAC,CAAC;IAEtB,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAE9C,GAAG,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAChC,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC;YACrB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE,CAAC,YAAY,CAAC;SACvB,CAAC;KACH,CAAC,CA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AC,CAAC;IAEtC,KAAK,MAAM,WAAW,IAAI,UAAU,CAAC,YAAY,EAAE;QACjD,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,EAAE,WAAW,EAAS,CAAC;QAE1D,MAAM,qBAAqB,GACzB,4BAA4B,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEtD,IAAI,CAAC,qBAAqB,EAAE;YAC1B,SAAS;SACV;QAED,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,IAAI,EAAE,CAAC;QAElD,UAAU,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG;YACnC,IAAI,EAAE,2CAA2C;SAClD,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import { convertHexToDecimal } from '@metamask/controller-utils';\nimport { createModuleLogger, type Hex } from '@metamask/utils';\nimport { cloneDeep } from 'lodash';\n\nimport {\n CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,\n DELEGATION_MANAGER_ADDRESSES,\n} from '../constants';\nimport { SimulationChainNotSupportedError, SimulationError } from '../errors';\nimport { projectLogger } from '../logger';\n\nconst log = createModuleLogger(projectLogger, 'simulation-api');\n\nconst RPC_METHOD = 'infura_simulateTransactions';\nconst BASE_URL = 'https://tx-sentinel-{0}.api.cx.metamask.io/';\nconst ENDPOINT_NETWORKS = 'networks';\n\n/** Single transaction to simulate in a simulation API request. */\nexport type SimulationRequestTransaction = {\n authorizationList?: {\n /** Address of a smart contract that contains the code to be set. */\n address: Hex;\n\n /** Address of the account being upgraded. */\n from: Hex;\n }[];\n\n /** Data to send with the transaction. */\n data?: Hex;\n\n /** Sender of the transaction. */\n from: Hex;\n\n /** Gas limit for the transaction. */\n gas?: Hex;\n\n /** Maximum fee per gas for the transaction. */\n maxFeePerGas?: Hex;\n\n /** Maximum priority fee per gas for the transaction. */\n maxPriorityFeePerGas?: Hex;\n\n /** Recipient of the transaction. */\n to?: Hex;\n\n /** Value to send with the transaction. */\n value?: Hex;\n};\n\n/** Request to the simulation API to simulate transactions. */\nexport type SimulationRequest = {\n blockOverrides?: {\n time?: Hex;\n };\n\n /**\n * Overrides to the state of the blockchain, keyed by address.\n */\n overrides?: {\n [address: Hex]: {\n /** Override the code for an address. */\n code?: Hex;\n\n /** Overrides to the storage slots for an address. */\n stateDiff?: {\n [slot: Hex]: Hex;\n };\n };\n };\n\n /**\n * Whether to include available token fees.\n */\n suggestFees?: {\n /* Whether to estimate gas for the transaction being submitted via a delegation. */\n with7702?: boolean;\n\n /* Whether to include the gas fee of the token transfer. */\n withFeeTransfer?: boolean;\n\n /* Whether to include the native transfer if available. */\n withTransfer?: boolean;\n };\n\n /**\n * Transactions to be sequentially simulated.\n * State changes impact subsequent transactions in the list.\n */\n transactions: SimulationRequestTransaction[];\n\n /**\n * Whether to include call traces in the response.\n * Defaults to false.\n */\n withCallTrace?: boolean;\n\n /**\n * Whether to include the default block data in the simulation.\n * Defaults to false.\n */\n withDefaultBlockOverrides?: boolean;\n\n /**\n * Whether to use the gas fees in the simulation.\n * Defaults to false.\n */\n withGas?: boolean;\n\n /**\n * Whether to include event logs in the response.\n * Defaults to false.\n */\n withLogs?: boolean;\n};\n\n/** Raw event log emitted by a simulated transaction. */\nexport type SimulationResponseLog = {\n /** Address of the account that created the event. */\n address: Hex;\n\n /** Raw data in the event that is not indexed. */\n data: Hex;\n\n /** Raw indexed data from the event. */\n topics: Hex[];\n};\n\n/** Call trace of a single simulated transaction. */\nexport type SimulationResponseCallTrace = {\n /** Nested calls. */\n calls: SimulationResponseCallTrace[];\n\n /** Raw event logs created by the call. */\n logs: SimulationResponseLog[];\n};\n\n/**\n * Changes to the blockchain state.\n * Keyed by account address.\n */\nexport type SimulationResponseStateDiff = {\n [address: Hex]: {\n /** Native balance of the account. */\n balance?: Hex;\n\n /** Nonce of the account. */\n nonce?: Hex;\n\n /** Storage values per slot. */\n storage?: {\n [slot: Hex]: Hex;\n };\n };\n};\n\nexport type SimulationResponseTokenFee = {\n /** Token data independent of current transaction. */\n token: {\n /** Address of the token contract. */\n address: Hex;\n\n /** Decimals of the token. */\n decimals: number;\n\n /** Symbol of the token. */\n symbol: string;\n };\n\n /** Amount of tokens needed to pay for gas. */\n balanceNeededToken: Hex;\n\n /** Current token balance of sender. */\n currentBalanceToken: Hex;\n\n /** Account address that token should be transferred to. */\n feeRecipient: Hex;\n\n /** Conversation rate of 1 token to native WEI. */\n rateWei: Hex;\n\n /** Portion of `balanceNeededToken` that is the fee paid to MetaMask. */\n serviceFee?: Hex;\n\n /** Estimated gas limit required for fee transfer. */\n transferEstimate: Hex;\n};\n\n/** Response from the simulation API for a single transaction. */\nexport type SimulationResponseTransaction = {\n /** Hierarchy of call data including nested calls and logs. */\n callTrace?: SimulationResponseCallTrace;\n\n /** An error message indicating the transaction could not be simulated. */\n error?: string;\n\n /** Recommended gas fees for the transaction. */\n fees?: {\n /** Gas limit for the fee level. */\n gas: Hex;\n\n /** Maximum fee per gas for the fee level. */\n maxFeePerGas: Hex;\n\n /** Maximum priority fee per gas for the fee level. */\n maxPriorityFeePerGas: Hex;\n\n /** Token fee data for the fee level. */\n tokenFees: SimulationResponseTokenFee[];\n }[];\n\n /**\n * Estimated total gas cost of the transaction.\n * Included in the stateDiff if `withGas` is true.\n */\n gasCost?: number;\n\n /** Required `gasLimit` for the transaction. */\n gasLimit?: Hex;\n\n /** Total gas used by the transaction. */\n gasUsed?: Hex;\n\n /** Return value of the transaction, such as the balance if calling balanceOf. */\n return: Hex;\n\n /** Changes to the blockchain state. */\n stateDiff?: {\n /** Initial blockchain state before the transaction. */\n pre?: SimulationResponseStateDiff;\n\n /** Updated blockchain state after the transaction. */\n post?: SimulationResponseStateDiff;\n };\n};\n\n/** Response from the simulation API. */\nexport type SimulationResponse = {\n /** Simulation data for each transaction in the request. */\n transactions: SimulationResponseTransaction[];\n};\n\n/** Data for a network supported by the Simulation API. */\ntype SimulationNetwork = {\n /** Subdomain of the API for the network. */\n network: string;\n\n /** Whether the network supports confirmation simulations. */\n confirmations: boolean;\n};\n\n/** Response from the simulation API containing supported networks. */\ntype SimulationNetworkResponse = {\n [chainIdDecimal: string]: SimulationNetwork;\n};\n\nlet requestIdCounter = 0;\n\n/**\n * Simulate transactions using the transaction simulation API.\n *\n * @param chainId - The chain ID to simulate transactions on.\n * @param request - The request to simulate transactions.\n * @returns The response from the simulation API.\n */\nexport async function simulateTransactions(\n chainId: Hex,\n request: SimulationRequest,\n): Promise<SimulationResponse> {\n const url = await getSimulationUrl(chainId);\n\n const requestId = requestIdCounter;\n requestIdCounter += 1;\n\n const finalRequest = finalizeRequest(request);\n\n log('Sending request', url, request);\n\n const response = await fetch(url, {\n method: 'POST',\n body: JSON.stringify({\n id: String(requestId),\n jsonrpc: '2.0',\n method: RPC_METHOD,\n params: [finalRequest],\n }),\n });\n\n const responseJson = await response.json();\n\n log('Received response', responseJson);\n\n if (responseJson.error) {\n const { code, message } = responseJson.error;\n throw new SimulationError(message, code);\n }\n\n return responseJson?.result;\n}\n\n/**\n * Get the URL for the transaction simulation API.\n *\n * @param chainId - The chain ID to get the URL for.\n * @returns The URL for the transaction simulation API.\n */\nasync function getSimulationUrl(chainId: Hex): Promise<string> {\n const networkData = await getNetworkData();\n const chainIdDecimal = convertHexToDecimal(chainId);\n const network = networkData[chainIdDecimal];\n\n if (!network?.confirmations) {\n log('Chain is not supported', chainId);\n throw new SimulationChainNotSupportedError(chainId);\n }\n\n return getUrl(network.network);\n}\n\n/**\n * Retrieve the supported network data from the simulation API.\n *\n * @returns The network data response from the simulation API.\n */\nasync function getNetworkData(): Promise<SimulationNetworkResponse> {\n const url = `${getUrl('ethereum-mainnet')}${ENDPOINT_NETWORKS}`;\n const response = await fetch(url);\n return response.json();\n}\n\n/**\n * Generate the URL for the specified subdomain in the simulation API.\n *\n * @param subdomain - The subdomain to generate the URL for.\n * @returns The URL for the transaction simulation API.\n */\nfunction getUrl(subdomain: string): string {\n return BASE_URL.replace('{0}', subdomain);\n}\n\n/**\n * Finalize the simulation request.\n * Overrides the DelegationManager code to remove signature errors.\n * Temporary pending support in the simulation API.\n *\n * @param request - The simulation request to finalize.\n * @returns The finalized simulation request.\n */\nfunction finalizeRequest(request: SimulationRequest): SimulationRequest {\n const newRequest = cloneDeep(request);\n\n for (const transaction of newRequest.transactions) {\n const normalizedTo = transaction.to?.toLowerCase() as Hex;\n\n const isToDelegationManager =\n DELEGATION_MANAGER_ADDRESSES.includes(normalizedTo);\n\n if (!isToDelegationManager) {\n continue;\n }\n\n newRequest.overrides = newRequest.overrides || {};\n\n newRequest.overrides[normalizedTo] = {\n code: CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS,\n };\n }\n\n return newRequest;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ABI_IERC7821 = exports.ABI_SIMULATION_ERC721_LEGACY = exports.ABI_SIMULATION_ERC20_WRAPPED = exports.CHAIN_IDS = void 0;
3
+ exports.CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS = exports.DELEGATION_MANAGER_ADDRESSES = exports.ABI_IERC7821 = exports.ABI_SIMULATION_ERC721_LEGACY = exports.ABI_SIMULATION_ERC20_WRAPPED = exports.CHAIN_IDS = void 0;
4
4
  exports.CHAIN_IDS = {
5
5
  MAINNET: '0x1',
6
6
  GOERLI: '0x5',
@@ -100,4 +100,8 @@ exports.ABI_IERC7821 = [
100
100
  stateMutability: 'view',
101
101
  },
102
102
  ];
103
+ exports.DELEGATION_MANAGER_ADDRESSES = [
104
+ '0xdb9b1e94b5b69df7e401ddbede43491141047db3',
105
+ ];
106
+ exports.CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS = '0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806383ebb771116100ad578063acb8cc4911610071578063acb8cc491461027f578063cef6d2091461029f578063e30c3978146102b2578063f2fde38b146102c3578063ffa1ad74146102d657600080fd5b806383ebb771146102065780638456cb591461020e57806384b0196e146102165780638da5cb5b14610231578063a3f4df7e1461024257600080fd5b806358909ebc116100f457806358909ebc146101b05780635c975abb146101d157806366134607146101e3578063715018a6146101f657806379ba5097146101fe57600080fd5b80631b13cac2146101315780632d40d0521461014d5780633ed01015146101805780633f4ba83a14610195578063499340471461019d575b600080fd5b61013a60001981565b6040519081526020015b60405180910390f35b61017061015b36600461207e565b60046020526000908152604090205460ff1681565b6040519015158152602001610144565b61019361018e366004612097565b6102fa565b005b6101936103f4565b6101936101ab366004612097565b610406565b6101b9610a1181565b6040516001600160a01b039091168152602001610144565b600154600160a01b900460ff16610170565b61013a6101f1366004612097565b6104f6565b61019361050f565b610193610521565b61013a61056a565b610193610579565b61021e610589565b6040516101449796959493929190612128565b6000546001600160a01b03166101b9565b610272604051806040016040528060118152602001702232b632b3b0ba34b7b726b0b730b3b2b960791b81525081565b60405161014491906121c1565b610272604051806040016040528060018152602001603160f81b81525081565b6101936102ad36600461221f565b6105cf565b6001546001600160a01b03166101b9565b6101936102d13660046122d4565b611829565b610272604051806040016040528060058152602001640312e332e360dc1b81525081565b61030a60408201602083016122d4565b6001600160a01b03811633146103335760405163b9f0f17160e01b815260040160405180910390fd5b600061033e836104f6565b60008181526004602052604090205490915060ff1661037057604051637952fbad60e11b815260040160405180910390fd5b6000818152600460209081526040909120805460ff19169055610395908401846122d4565b6001600160a01b03166103ae60408501602086016122d4565b6001600160a01b0316827f3feadce88fc1b49db633a56fd5307ed6ee18734df83bcc4011daa720c9cd95f1866040516103e7919061241c565b60405180910390a4505050565b6103fc61189a565b6104046118c7565b565b61041660408201602083016122d4565b6001600160a01b038116331461043f5760405163b9f0f17160e01b815260040160405180910390fd5b600061044a836104f6565b60008181526004602052604090205490915060ff161561047c57604051625ecddb60e01b815260040160405180910390fd5b6000818152600460209081526040909120805460ff191660011790556104a4908401846122d4565b6001600160a01b03166104bd60408501602086016122d4565b6001600160a01b0316827fea589ba9473ee1fe77d352c7ed919747715a5d22931b972de9b02a907c66d5dd866040516103e7919061241c565b6000610509610504836127bb565b61191c565b92915050565b61051761189a565b61040460006119b7565b60015433906001600160a01b0316811461055e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b610567816119b7565b50565b60006105746119d0565b905090565b61058161189a565b610404611afb565b60006060806000806000606061059d611b3e565b6105a5611b6b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6105d7611b98565b8481811415806105e75750808414155b1561060557604051631bcaf69f60e01b815260040160405180910390fd5b6000816001600160401b0381111561061f5761061f6124ed565b60405190808252806020026020018201604052801561065257816020015b606081526020019060019003908161063d5790505b5090506000826001600160401b0381111561066f5761066f6124ed565b6040519080825280602002602001820160405280156106a257816020015b606081526020019060019003908161068d5790505b50905060005b83811015610c195760008a8a838181106106c4576106c46127c7565b90506020028101906106d691906127dd565b8101906106e39190612823565b905080516000036107d1576040805160008082526020820190925290610765565b6107526040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600080191681526020016060815260200160008152602001606081525090565b8152602001906001900390816107045790505b50848381518110610778576107786127c7565b602090810291909101015260006040519080825280602002602001820160405280156107ae578160200160208202803683370190505b508383815181106107c1576107c16127c7565b6020026020010181905250610c10565b808483815181106107e4576107e46127c7565b6020026020010181905250600081516001600160401b0381111561080a5761080a6124ed565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b50905080848481518110610849576108496127c7565b6020026020010181905250336001600160a01b031682600081518110610871576108716127c7565b6020026020010151600001516001600160a01b0316141580156108c65750610a116001600160a01b0316826000815181106108ae576108ae6127c7565b6020026020010151600001516001600160a01b031614155b156108e457604051632d618d8160e21b815260040160405180910390fd5b60005b8251811015610a4d576000838281518110610904576109046127c7565b602002602001015190506109178161191c565b838381518110610929576109296127c7565b60200260200101818152505080602001516001600160a01b03163b6000036109a657600061099e61099461095b61056a565b86868151811061096d5761096d6127c7565b602002602001015160405161190160f01b8152600281019290925260228201526042902090565b8360a00151611bc3565b905050610a44565b60006109c56109b361056a565b85858151811061096d5761096d6127c7565b9050600082602001516001600160a01b0316631626ba7e838560a001516040518363ffffffff1660e01b81526004016109ff9291906128d3565b602060405180830381865afa158015610a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4091906128f4565b5050505b506001016108e7565b5060005b8251811015610c0d5760046000838381518110610a7057610a706127c7565b60209081029190910181015182528101919091526040016000205460ff1615610aac576040516302dd502960e11b815260040160405180910390fd5b60018351610aba9190612934565b8114610bc35781610acc826001612947565b81518110610adc57610adc6127c7565b6020026020010151838281518110610af657610af66127c7565b60200260200101516040015114610b2057604051636f6a1b8760e11b815260040160405180910390fd5b600083610b2e836001612947565b81518110610b3e57610b3e6127c7565b6020026020010151600001519050610a116001600160a01b0316816001600160a01b031614158015610b9f5750806001600160a01b0316848381518110610b8757610b876127c7565b6020026020010151602001516001600160a01b031614155b15610bbd57604051632d618d8160e21b815260040160405180910390fd5b50610c05565b60001960001b838281518110610bdb57610bdb6127c7565b60200260200101516040015114610c0557604051636f6a1b8760e11b815260040160405180910390fd5b600101610a51565b50505b506001016106a8565b5060005b83811015610e3e576000838281518110610c3957610c396127c7565b6020026020010151511115610e365760005b838281518110610c5d57610c5d6127c7565b602002602001015151811015610e34576000848381518110610c8157610c816127c7565b60200260200101518281518110610c9a57610c9a6127c7565b602002602001015160600151905060005b8151811015610e2a576000828281518110610cc857610cc86127c7565b6020026020010151600001519050806001600160a01b031663414c3e33848481518110610cf757610cf76127c7565b602002602001015160200151858581518110610d1557610d156127c7565b6020026020010151604001518f8f8a818110610d3357610d336127c7565b905060200201358e8e8b818110610d4c57610d4c6127c7565b9050602002810190610d5e91906127dd565b8c8c81518110610d7057610d706127c7565b60200260200101518b81518110610d8957610d896127c7565b60200260200101518e8d81518110610da357610da36127c7565b60200260200101518c81518110610dbc57610dbc6127c7565b602002602001015160200151336040518963ffffffff1660e01b8152600401610dec98979695949392919061295a565b600060405180830381600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b5050505050806001019050610cab565b5050600101610c4b565b505b600101610c1d565b5060005b8381101561146257828181518110610e5c57610e5c6127c7565b602002602001015151600003610f1a573363d691c964898984818110610e8457610e846127c7565b90506020020135888885818110610e9d57610e9d6127c7565b9050602002810190610eaf91906127dd565b6040518463ffffffff1660e01b8152600401610ecd939291906129c5565b6000604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1491908101906129e8565b5061145a565b60005b838281518110610f2f57610f2f6127c7565b602002602001015151811015611106576000848381518110610f5357610f536127c7565b60200260200101518281518110610f6c57610f6c6127c7565b602002602001015160600151905060005b81518110156110fc576000828281518110610f9a57610f9a6127c7565b6020026020010151600001519050806001600160a01b031663a145832a848481518110610fc957610fc96127c7565b602002602001015160200151858581518110610fe757610fe76127c7565b6020026020010151604001518f8f8a818110611005576110056127c7565b905060200201358e8e8b81811061101e5761101e6127c7565b905060200281019061103091906127dd565b8c8c81518110611042576110426127c7565b60200260200101518b8151811061105b5761105b6127c7565b60200260200101518e8d81518110611075576110756127c7565b60200260200101518c8151811061108e5761108e6127c7565b602002602001015160200151336040518963ffffffff1660e01b81526004016110be98979695949392919061295a565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050505050806001019050610f7d565b5050600101610f1d565b50828181518110611119576111196127c7565b60200260200101516001848381518110611135576111356127c7565b6020026020010151516111489190612934565b81518110611158576111586127c7565b6020026020010151602001516001600160a01b031663d691c964898984818110611184576111846127c7565b9050602002013588888581811061119d5761119d6127c7565b90506020028101906111af91906127dd565b6040518463ffffffff1660e01b81526004016111cd939291906129c5565b6000604051808303816000875af11580156111ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261121491908101906129e8565b506000838281518110611229576112296127c7565b60200260200101515190505b801561145857600084838151811061124f5761124f6127c7565b60200260200101516001836112649190612934565b81518110611274576112746127c7565b60200260200101516060015190506000815190505b80156114455760008261129d600184612934565b815181106112ad576112ad6127c7565b6020026020010151600001519050806001600160a01b031663d3eddcc5846001856112d89190612934565b815181106112e8576112e86127c7565b602002602001015160200151856001866113029190612934565b81518110611312576113126127c7565b6020026020010151604001518f8f8a818110611330576113306127c7565b905060200201358e8e8b818110611349576113496127c7565b905060200281019061135b91906127dd565b8c8c8151811061136d5761136d6127c7565b602002602001015160018c6113829190612934565b81518110611392576113926127c7565b60200260200101518e8d815181106113ac576113ac6127c7565b602002602001015160018d6113c19190612934565b815181106113d1576113d16127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161140198979695949392919061295a565b600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050508061143e90612ac7565b9050611289565b50508061145190612ac7565b9050611235565b505b600101610e42565b5060005b838110156116de576000838281518110611482576114826127c7565b60200260200101515111156116d65760008382815181106114a5576114a56127c7565b60200260200101515190505b80156116d45760008483815181106114cb576114cb6127c7565b60200260200101516001836114e09190612934565b815181106114f0576114f06127c7565b60200260200101516060015190506000815190505b80156116c157600082611519600184612934565b81518110611529576115296127c7565b6020026020010151600001519050806001600160a01b031663ed463367846001856115549190612934565b81518110611564576115646127c7565b6020026020010151602001518560018661157e9190612934565b8151811061158e5761158e6127c7565b6020026020010151604001518f8f8a8181106115ac576115ac6127c7565b905060200201358e8e8b8181106115c5576115c56127c7565b90506020028101906115d791906127dd565b8c8c815181106115e9576115e96127c7565b602002602001015160018c6115fe9190612934565b8151811061160e5761160e6127c7565b60200260200101518e8d81518110611628576116286127c7565b602002602001015160018d61163d9190612934565b8151811061164d5761164d6127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161167d98979695949392919061295a565b600060405180830381600087803b15801561169757600080fd5b505af11580156116ab573d6000803e3d6000fd5b5050505050806116ba90612ac7565b9050611505565b5050806116cd90612ac7565b90506114b1565b505b600101611466565b5060005b8381101561181d5760008382815181106116fe576116fe6127c7565b60200260200101515111156118155760005b838281518110611722576117226127c7565b60200260200101515181101561181357336001600160a01b031684838151811061174e5761174e6127c7565b6020026020010151600186858151811061176a5761176a6127c7565b60200260200101515161177d9190612934565b8151811061178d5761178d6127c7565b6020026020010151602001516001600160a01b03167f40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b18738685815181106117d5576117d56127c7565b602002602001015184815181106117ee576117ee6127c7565b60200260200101516040516118039190612ade565b60405180910390a3600101611710565b505b6001016116e2565b50505050505050505050565b61183161189a565b600180546001600160a01b0383166001600160a01b031990911681179091556118626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146104045760405163118cdaa760e01b8152336004820152602401610555565b6118cf611bed565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000807f88c1d2ecf185adf710588203a5f263f0ff61be0d33da39792cde19ba9aa4331e83600001518460200151856040015161195c8760600151611c17565b6080808901516040805160208101989098526001600160a01b03968716908801529490931660608601529184015260a083015260c082015260e0015b60408051601f1981840301815291905280516020909101209392505050565b600180546001600160a01b031916905561056781611ce2565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611a2957507f000000000000000000000000000000000000000000000000000000000000000046145b15611a5357507f000000000000000000000000000000000000000000000000000000000000000090565b610574604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b03611b98565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118ff3390565b60606105747f00000000000000000000000000000000000000000000000000000000000000006002611d32565b60606105747f00000000000000000000000000000000000000000000000000000000000000006003611d32565b600154600160a01b900460ff16156104045760405163d93c066560e01b815260040160405180910390fd5b600080600080611bd38686611ddd565b925092509250611be38282611e2a565b5090949350505050565b600154600160a01b900460ff1661040457604051638dfc202b60e01b815260040160405180910390fd5b60008082516001600160401b03811115611c3357611c336124ed565b604051908082528060200260200182016040528015611c5c578160200160208202803683370190505b50905060005b8351811015611cb257611c8d848281518110611c8057611c806127c7565b6020026020010151611ee7565b828281518110611c9f57611c9f6127c7565b6020908102919091010152600101611c62565b5080604051602001611cc49190612bcb565b60405160208183030381529060405280519060200120915050919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff8314611d4c57611d4583611f48565b9050610509565b818054611d5890612c01565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8490612c01565b8015611dd15780601f10611da657610100808354040283529160200191611dd1565b820191906000526020600020905b815481529060010190602001808311611db457829003601f168201915b50505050509050610509565b60008060008351604103611e175760208401516040850151606086015160001a611e0988828585611f87565b955095509550505050611e23565b50508151600091506002905b9250925092565b6000826003811115611e3e57611e3e612c3b565b03611e47575050565b6001826003811115611e5b57611e5b612c3b565b03611e795760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611e8d57611e8d612c3b565b03611eae5760405163fce698f760e01b815260048101829052602401610555565b6003826003811115611ec257611ec2612c3b565b03611ee3576040516335e2f38360e21b815260048101829052602401610555565b5050565b6000807f80ad7e1b04ee6d994a125f4714ca0720908bd80ed16063ec8aee4b88e9253e2d8360000151846020015180519060200120604051602001611998939291909283526001600160a01b03919091166020830152604082015260600190565b60606000611f5583612056565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611fc2575060009150600390508261204c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612016573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120425750600092506001915082905061204c565b9250600091508190505b9450945094915050565b600060ff8216601f81111561050957604051632cd44ac360e21b815260040160405180910390fd5b60006020828403121561209057600080fd5b5035919050565b6000602082840312156120a957600080fd5b81356001600160401b038111156120bf57600080fd5b820160c081850312156120d157600080fd5b9392505050565b60005b838110156120f35781810151838201526020016120db565b50506000910152565b600081518084526121148160208601602086016120d8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261214960e084018a6120fc565b838103604085015261215b818a6120fc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156121af57835183529284019291840191600101612193565b50909c9b505050505050505050505050565b6020815260006120d160208301846120fc565b60008083601f8401126121e657600080fd5b5081356001600160401b038111156121fd57600080fd5b6020830191508360208260051b850101111561221857600080fd5b9250929050565b6000806000806000806060878903121561223857600080fd5b86356001600160401b038082111561224f57600080fd5b61225b8a838b016121d4565b9098509650602089013591508082111561227457600080fd5b6122808a838b016121d4565b9096509450604089013591508082111561229957600080fd5b506122a689828a016121d4565b979a9699509497509295939492505050565b80356001600160a01b03811681146122cf57600080fd5b919050565b6000602082840312156122e657600080fd5b6120d1826122b8565b6000808335601e1984360301811261230657600080fd5b83016020810192503590506001600160401b0381111561232557600080fd5b80360382131561221857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008383855260208086019550808560051b830101846000805b8881101561240e57858403601f19018a52823536899003605e1901811261239c578283fd5b880160606001600160a01b036123b1836122b8565b1686526123c0878301836122ef565b82898901526123d28389018284612334565b9250505060406123e4818401846122ef565b9350878303828901526123f8838583612334565b9d89019d97505050938601935050600101612377565b509198975050505050505050565b6020815260006001600160a01b0380612434856122b8565b16602084015280612447602086016122b8565b16604084015250604083013560608301526060830135601e1984360301811261246f57600080fd5b83016020810190356001600160401b0381111561248b57600080fd5b8060051b360382131561249d57600080fd5b60c060808501526124b260e08501828461235d565b915050608084013560a08401526124cc60a08501856122ef565b848303601f190160c08601526124e3838284612334565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612525576125256124ed565b60405290565b60405160c081016001600160401b0381118282101715612525576125256124ed565b604051601f8201601f191681016001600160401b0381118282101715612575576125756124ed565b604052919050565b60006001600160401b03821115612596576125966124ed565b5060051b60200190565b60006001600160401b038211156125b9576125b96124ed565b50601f01601f191660200190565b600082601f8301126125d857600080fd5b81356125eb6125e6826125a0565b61254d565b81815284602083860101111561260057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261262e57600080fd5b8135602061263e6125e68361257d565b82815260059290921b8401810191818101908684111561265d57600080fd5b8286015b8481101561270c5780356001600160401b03808211156126815760008081fd5b908801906060828b03601f190181131561269b5760008081fd5b6126a3612503565b6126ae8885016122b8565b8152604080850135848111156126c45760008081fd5b6126d28e8b838901016125c7565b838b0152509184013591838311156126ea5760008081fd5b6126f88d8a858801016125c7565b908201528652505050918301918301612661565b509695505050505050565b600060c0828403121561272957600080fd5b61273161252b565b905061273c826122b8565b815261274a602083016122b8565b60208201526040820135604082015260608201356001600160401b038082111561277357600080fd5b61277f8583860161261d565b60608401526080840135608084015260a08401359150808211156127a257600080fd5b506127af848285016125c7565b60a08301525092915050565b60006105093683612717565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126127f457600080fd5b8301803591506001600160401b0382111561280e57600080fd5b60200191503681900382131561221857600080fd5b6000602080838503121561283657600080fd5b82356001600160401b038082111561284d57600080fd5b818501915085601f83011261286157600080fd5b813561286f6125e68261257d565b81815260059190911b8301840190848101908883111561288e57600080fd5b8585015b838110156128c6578035858111156128aa5760008081fd5b6128b88b89838a0101612717565b845250918601918601612892565b5098975050505050505050565b8281526040602082015260006128ec60408301846120fc565b949350505050565b60006020828403121561290657600080fd5b81516001600160e01b0319811681146120d157600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156105095761050961291e565b808201808211156105095761050961291e565b60e08152600061296d60e083018b6120fc565b828103602084015261297f818b6120fc565b9050886040840152828103606084015261299a81888a612334565b608084019690965250506001600160a01b0392831660a0820152911660c09091015295945050505050565b8381526040602082015260006129df604083018486612334565b95945050505050565b600060208083850312156129fb57600080fd5b82516001600160401b0380821115612a1257600080fd5b818501915085601f830112612a2657600080fd5b8151612a346125e68261257d565b81815260059190911b83018401908481019088831115612a5357600080fd5b8585015b838110156128c657805185811115612a6f5760008081fd5b8601603f81018b13612a815760008081fd5b878101516040612a936125e6836125a0565b8281528d82848601011115612aa85760008081fd5b612ab7838c83018487016120d8565b8652505050918601918601612a57565b600081612ad657612ad661291e565b506000190190565b602080825282516001600160a01b0390811683830152838201518116604080850191909152808501516060808601919091528086015160c06080870152805160e0870181905260009594610100600583901b8901810195919493870193919290890190885b81811015612b9d5760ff198b8903018352855187815116895289810151858b8b0152612b71868b01826120fc565b918701518a83038b890152919050612b8981836120fc565b995050509488019491880191600101612b43565b50505050505050608085015160a085015260a08501519150601f198482030160c08501526129df81836120fc565b815160009082906020808601845b83811015612bf557815185529382019390820190600101612bd9565b50929695505050505050565b600181811c90821680612c1557607f821691505b602082108103612c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122073f8fd2b36b643aff6f988638bc7c8ab2f41546c01a777524170b479e36618c564736f6c63430008170033';
103
107
  //# sourceMappingURL=constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,SAAS;IACvB,GAAG,EAAE,MAAM;IACX,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,KAAK;IACf,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,MAAM;IACb,aAAa,EAAE,QAAQ;IACvB,gBAAgB,EAAE,UAAU;IAC5B,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,SAAS;IAC1B,SAAS,EAAE,QAAQ;IACnB,iBAAiB,EAAE,QAAQ;IAC3B,MAAM,EAAE,MAAM;IACd,cAAc,EAAE,O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aAChB;YACD;gBACE,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;KACd;CACF,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE;YAC3D,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;SAChE;QACD,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,SAAS;KAC3B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;QACrE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;QAC3D,eAAe,EAAE,MAAM;KACxB;CACF,CAAC","sourcesContent":["export const CHAIN_IDS = {\n MAINNET: '0x1',\n GOERLI: '0x5',\n BASE: '0x2105',\n BASE_TESTNET: '0x14a33',\n BSC: '0x38',\n BSC_TESTNET: '0x61',\n OPTIMISM: '0xa',\n OPTIMISM_TESTNET: '0x1a4',\n OPBNB: '0xcc',\n OPBNB_TESTNET: '0x15eb',\n OPTIMISM_SEPOLIA: '0xaa37dc',\n POLYGON: '0x89',\n POLYGON_TESTNET: '0x13881',\n AVALANCHE: '0xa86a',\n AVALANCHE_TESTNET: '0xa869',\n FANTOM: '0xfa',\n FANTOM_TESTNET: '0xfa2',\n SEPOLIA: '0xaa36a7',\n LINEA_GOERLI: '0xe704',\n LINEA_SEPOLIA: '0xe705',\n LINEA_MAINNET: '0xe708',\n MOONBEAM: '0x504',\n MOONBEAM_TESTNET: '0x507',\n MOONRIVER: '0x505',\n GNOSIS: '0x64',\n ARBITRUM: '0xa4b1',\n ZKSYNC_ERA: '0x144',\n ZORA: '0x76adf1',\n SCROLL: '0x82750',\n SCROLL_SEPOLIA: '0x8274f',\n MEGAETH_TESTNET: '0x18c6',\n SEI: '0x531',\n} as const;\n\n/** Extract of the Wrapped ERC-20 ABI required for simulation. */\nexport const ABI_SIMULATION_ERC20_WRAPPED = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: 'to', type: 'address' },\n { indexed: false, name: 'wad', type: 'uint256' },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: 'from', type: 'address' },\n { indexed: false, name: 'wad', type: 'uint256' },\n ],\n name: 'Withdrawal',\n type: 'event',\n },\n];\n\n/** Extract of the legacy ERC-721 ABI required for simulation. */\nexport const ABI_SIMULATION_ERC721_LEGACY = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n name: '_from',\n type: 'address',\n },\n {\n indexed: false,\n name: '_to',\n type: 'address',\n },\n {\n indexed: false,\n name: '_tokenId',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n];\n\nexport const ABI_IERC7821 = [\n {\n type: 'function',\n name: 'execute',\n inputs: [\n { name: 'mode', type: 'bytes32', internalType: 'ModeCode' },\n { name: 'executionData', type: 'bytes', internalType: 'bytes' },\n ],\n outputs: [],\n stateMutability: 'payable',\n },\n {\n type: 'function',\n name: 'supportsExecutionMode',\n inputs: [{ name: 'mode', type: 'bytes32', internalType: 'ModeCode' }],\n outputs: [{ name: '', type: 'bool', internalType: 'bool' }],\n stateMutability: 'view',\n },\n];\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,OAAO,EAAE,KAAK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CAAC;AAEW,QAAA,2CAA2C,GACtD,kxsBAAkxsB,CAAC","sourcesContent":["export const CHAIN_IDS = {\n MAINNET: '0x1',\n GOERLI: '0x5',\n BASE: '0x2105',\n BASE_TESTNET: '0x14a33',\n BSC: '0x38',\n BSC_TESTNET: '0x61',\n OPTIMISM: '0xa',\n OPTIMISM_TESTNET: '0x1a4',\n OPBNB: '0xcc',\n OPBNB_TESTNET: '0x15eb',\n OPTIMISM_SEPOLIA: '0xaa37dc',\n POLYGON: '0x89',\n POLYGON_TESTNET: '0x13881',\n AVALANCHE: '0xa86a',\n AVALANCHE_TESTNET: '0xa869',\n FANTOM: '0xfa',\n FANTOM_TESTNET: '0xfa2',\n SEPOLIA: '0xaa36a7',\n LINEA_GOERLI: '0xe704',\n LINEA_SEPOLIA: '0xe705',\n LINEA_MAINNET: '0xe708',\n MOONBEAM: '0x504',\n MOONBEAM_TESTNET: '0x507',\n MOONRIVER: '0x505',\n GNOSIS: '0x64',\n ARBITRUM: '0xa4b1',\n ZKSYNC_ERA: '0x144',\n ZORA: '0x76adf1',\n SCROLL: '0x82750',\n SCROLL_SEPOLIA: '0x8274f',\n MEGAETH_TESTNET: '0x18c6',\n SEI: '0x531',\n} as const;\n\n/** Extract of the Wrapped ERC-20 ABI required for simulation. */\nexport const ABI_SIMULATION_ERC20_WRAPPED = [\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: 'to', type: 'address' },\n { indexed: false, name: 'wad', type: 'uint256' },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n { indexed: true, name: 'from', type: 'address' },\n { indexed: false, name: 'wad', type: 'uint256' },\n ],\n name: 'Withdrawal',\n type: 'event',\n },\n];\n\n/** Extract of the legacy ERC-721 ABI required for simulation. */\nexport const ABI_SIMULATION_ERC721_LEGACY = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n name: '_from',\n type: 'address',\n },\n {\n indexed: false,\n name: '_to',\n type: 'address',\n },\n {\n indexed: false,\n name: '_tokenId',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n];\n\nexport const ABI_IERC7821 = [\n {\n type: 'function',\n name: 'execute',\n inputs: [\n { name: 'mode', type: 'bytes32', internalType: 'ModeCode' },\n { name: 'executionData', type: 'bytes', internalType: 'bytes' },\n ],\n outputs: [],\n stateMutability: 'payable',\n },\n {\n type: 'function',\n name: 'supportsExecutionMode',\n inputs: [{ name: 'mode', type: 'bytes32', internalType: 'ModeCode' }],\n outputs: [{ name: '', type: 'bool', internalType: 'bool' }],\n stateMutability: 'view',\n },\n];\n\nexport const DELEGATION_MANAGER_ADDRESSES = [\n '0xdb9b1e94b5b69df7e401ddbede43491141047db3',\n];\n\nexport const CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS =\n '0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806383ebb771116100ad578063acb8cc4911610071578063acb8cc491461027f578063cef6d2091461029f578063e30c3978146102b2578063f2fde38b146102c3578063ffa1ad74146102d657600080fd5b806383ebb771146102065780638456cb591461020e57806384b0196e146102165780638da5cb5b14610231578063a3f4df7e1461024257600080fd5b806358909ebc116100f457806358909ebc146101b05780635c975abb146101d157806366134607146101e3578063715018a6146101f657806379ba5097146101fe57600080fd5b80631b13cac2146101315780632d40d0521461014d5780633ed01015146101805780633f4ba83a14610195578063499340471461019d575b600080fd5b61013a60001981565b6040519081526020015b60405180910390f35b61017061015b36600461207e565b60046020526000908152604090205460ff1681565b6040519015158152602001610144565b61019361018e366004612097565b6102fa565b005b6101936103f4565b6101936101ab366004612097565b610406565b6101b9610a1181565b6040516001600160a01b039091168152602001610144565b600154600160a01b900460ff16610170565b61013a6101f1366004612097565b6104f6565b61019361050f565b610193610521565b61013a61056a565b610193610579565b61021e610589565b6040516101449796959493929190612128565b6000546001600160a01b03166101b9565b610272604051806040016040528060118152602001702232b632b3b0ba34b7b726b0b730b3b2b960791b81525081565b60405161014491906121c1565b610272604051806040016040528060018152602001603160f81b81525081565b6101936102ad36600461221f565b6105cf565b6001546001600160a01b03166101b9565b6101936102d13660046122d4565b611829565b610272604051806040016040528060058152602001640312e332e360dc1b81525081565b61030a60408201602083016122d4565b6001600160a01b03811633146103335760405163b9f0f17160e01b815260040160405180910390fd5b600061033e836104f6565b60008181526004602052604090205490915060ff1661037057604051637952fbad60e11b815260040160405180910390fd5b6000818152600460209081526040909120805460ff19169055610395908401846122d4565b6001600160a01b03166103ae60408501602086016122d4565b6001600160a01b0316827f3feadce88fc1b49db633a56fd5307ed6ee18734df83bcc4011daa720c9cd95f1866040516103e7919061241c565b60405180910390a4505050565b6103fc61189a565b6104046118c7565b565b61041660408201602083016122d4565b6001600160a01b038116331461043f5760405163b9f0f17160e01b815260040160405180910390fd5b600061044a836104f6565b60008181526004602052604090205490915060ff161561047c57604051625ecddb60e01b815260040160405180910390fd5b6000818152600460209081526040909120805460ff191660011790556104a4908401846122d4565b6001600160a01b03166104bd60408501602086016122d4565b6001600160a01b0316827fea589ba9473ee1fe77d352c7ed919747715a5d22931b972de9b02a907c66d5dd866040516103e7919061241c565b6000610509610504836127bb565b61191c565b92915050565b61051761189a565b61040460006119b7565b60015433906001600160a01b0316811461055e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b610567816119b7565b50565b60006105746119d0565b905090565b61058161189a565b610404611afb565b60006060806000806000606061059d611b3e565b6105a5611b6b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6105d7611b98565b8481811415806105e75750808414155b1561060557604051631bcaf69f60e01b815260040160405180910390fd5b6000816001600160401b0381111561061f5761061f6124ed565b60405190808252806020026020018201604052801561065257816020015b606081526020019060019003908161063d5790505b5090506000826001600160401b0381111561066f5761066f6124ed565b6040519080825280602002602001820160405280156106a257816020015b606081526020019060019003908161068d5790505b50905060005b83811015610c195760008a8a838181106106c4576106c46127c7565b90506020028101906106d691906127dd565b8101906106e39190612823565b905080516000036107d1576040805160008082526020820190925290610765565b6107526040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600080191681526020016060815260200160008152602001606081525090565b8152602001906001900390816107045790505b50848381518110610778576107786127c7565b602090810291909101015260006040519080825280602002602001820160405280156107ae578160200160208202803683370190505b508383815181106107c1576107c16127c7565b6020026020010181905250610c10565b808483815181106107e4576107e46127c7565b6020026020010181905250600081516001600160401b0381111561080a5761080a6124ed565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b50905080848481518110610849576108496127c7565b6020026020010181905250336001600160a01b031682600081518110610871576108716127c7565b6020026020010151600001516001600160a01b0316141580156108c65750610a116001600160a01b0316826000815181106108ae576108ae6127c7565b6020026020010151600001516001600160a01b031614155b156108e457604051632d618d8160e21b815260040160405180910390fd5b60005b8251811015610a4d576000838281518110610904576109046127c7565b602002602001015190506109178161191c565b838381518110610929576109296127c7565b60200260200101818152505080602001516001600160a01b03163b6000036109a657600061099e61099461095b61056a565b86868151811061096d5761096d6127c7565b602002602001015160405161190160f01b8152600281019290925260228201526042902090565b8360a00151611bc3565b905050610a44565b60006109c56109b361056a565b85858151811061096d5761096d6127c7565b9050600082602001516001600160a01b0316631626ba7e838560a001516040518363ffffffff1660e01b81526004016109ff9291906128d3565b602060405180830381865afa158015610a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4091906128f4565b5050505b506001016108e7565b5060005b8251811015610c0d5760046000838381518110610a7057610a706127c7565b60209081029190910181015182528101919091526040016000205460ff1615610aac576040516302dd502960e11b815260040160405180910390fd5b60018351610aba9190612934565b8114610bc35781610acc826001612947565b81518110610adc57610adc6127c7565b6020026020010151838281518110610af657610af66127c7565b60200260200101516040015114610b2057604051636f6a1b8760e11b815260040160405180910390fd5b600083610b2e836001612947565b81518110610b3e57610b3e6127c7565b6020026020010151600001519050610a116001600160a01b0316816001600160a01b031614158015610b9f5750806001600160a01b0316848381518110610b8757610b876127c7565b6020026020010151602001516001600160a01b031614155b15610bbd57604051632d618d8160e21b815260040160405180910390fd5b50610c05565b60001960001b838281518110610bdb57610bdb6127c7565b60200260200101516040015114610c0557604051636f6a1b8760e11b815260040160405180910390fd5b600101610a51565b50505b506001016106a8565b5060005b83811015610e3e576000838281518110610c3957610c396127c7565b6020026020010151511115610e365760005b838281518110610c5d57610c5d6127c7565b602002602001015151811015610e34576000848381518110610c8157610c816127c7565b60200260200101518281518110610c9a57610c9a6127c7565b602002602001015160600151905060005b8151811015610e2a576000828281518110610cc857610cc86127c7565b6020026020010151600001519050806001600160a01b031663414c3e33848481518110610cf757610cf76127c7565b602002602001015160200151858581518110610d1557610d156127c7565b6020026020010151604001518f8f8a818110610d3357610d336127c7565b905060200201358e8e8b818110610d4c57610d4c6127c7565b9050602002810190610d5e91906127dd565b8c8c81518110610d7057610d706127c7565b60200260200101518b81518110610d8957610d896127c7565b60200260200101518e8d81518110610da357610da36127c7565b60200260200101518c81518110610dbc57610dbc6127c7565b602002602001015160200151336040518963ffffffff1660e01b8152600401610dec98979695949392919061295a565b600060405180830381600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b5050505050806001019050610cab565b5050600101610c4b565b505b600101610c1d565b5060005b8381101561146257828181518110610e5c57610e5c6127c7565b602002602001015151600003610f1a573363d691c964898984818110610e8457610e846127c7565b90506020020135888885818110610e9d57610e9d6127c7565b9050602002810190610eaf91906127dd565b6040518463ffffffff1660e01b8152600401610ecd939291906129c5565b6000604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1491908101906129e8565b5061145a565b60005b838281518110610f2f57610f2f6127c7565b602002602001015151811015611106576000848381518110610f5357610f536127c7565b60200260200101518281518110610f6c57610f6c6127c7565b602002602001015160600151905060005b81518110156110fc576000828281518110610f9a57610f9a6127c7565b6020026020010151600001519050806001600160a01b031663a145832a848481518110610fc957610fc96127c7565b602002602001015160200151858581518110610fe757610fe76127c7565b6020026020010151604001518f8f8a818110611005576110056127c7565b905060200201358e8e8b81811061101e5761101e6127c7565b905060200281019061103091906127dd565b8c8c81518110611042576110426127c7565b60200260200101518b8151811061105b5761105b6127c7565b60200260200101518e8d81518110611075576110756127c7565b60200260200101518c8151811061108e5761108e6127c7565b602002602001015160200151336040518963ffffffff1660e01b81526004016110be98979695949392919061295a565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050505050806001019050610f7d565b5050600101610f1d565b50828181518110611119576111196127c7565b60200260200101516001848381518110611135576111356127c7565b6020026020010151516111489190612934565b81518110611158576111586127c7565b6020026020010151602001516001600160a01b031663d691c964898984818110611184576111846127c7565b9050602002013588888581811061119d5761119d6127c7565b90506020028101906111af91906127dd565b6040518463ffffffff1660e01b81526004016111cd939291906129c5565b6000604051808303816000875af11580156111ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261121491908101906129e8565b506000838281518110611229576112296127c7565b60200260200101515190505b801561145857600084838151811061124f5761124f6127c7565b60200260200101516001836112649190612934565b81518110611274576112746127c7565b60200260200101516060015190506000815190505b80156114455760008261129d600184612934565b815181106112ad576112ad6127c7565b6020026020010151600001519050806001600160a01b031663d3eddcc5846001856112d89190612934565b815181106112e8576112e86127c7565b602002602001015160200151856001866113029190612934565b81518110611312576113126127c7565b6020026020010151604001518f8f8a818110611330576113306127c7565b905060200201358e8e8b818110611349576113496127c7565b905060200281019061135b91906127dd565b8c8c8151811061136d5761136d6127c7565b602002602001015160018c6113829190612934565b81518110611392576113926127c7565b60200260200101518e8d815181106113ac576113ac6127c7565b602002602001015160018d6113c19190612934565b815181106113d1576113d16127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161140198979695949392919061295a565b600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050508061143e90612ac7565b9050611289565b50508061145190612ac7565b9050611235565b505b600101610e42565b5060005b838110156116de576000838281518110611482576114826127c7565b60200260200101515111156116d65760008382815181106114a5576114a56127c7565b60200260200101515190505b80156116d45760008483815181106114cb576114cb6127c7565b60200260200101516001836114e09190612934565b815181106114f0576114f06127c7565b60200260200101516060015190506000815190505b80156116c157600082611519600184612934565b81518110611529576115296127c7565b6020026020010151600001519050806001600160a01b031663ed463367846001856115549190612934565b81518110611564576115646127c7565b6020026020010151602001518560018661157e9190612934565b8151811061158e5761158e6127c7565b6020026020010151604001518f8f8a8181106115ac576115ac6127c7565b905060200201358e8e8b8181106115c5576115c56127c7565b90506020028101906115d791906127dd565b8c8c815181106115e9576115e96127c7565b602002602001015160018c6115fe9190612934565b8151811061160e5761160e6127c7565b60200260200101518e8d81518110611628576116286127c7565b602002602001015160018d61163d9190612934565b8151811061164d5761164d6127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161167d98979695949392919061295a565b600060405180830381600087803b15801561169757600080fd5b505af11580156116ab573d6000803e3d6000fd5b5050505050806116ba90612ac7565b9050611505565b5050806116cd90612ac7565b90506114b1565b505b600101611466565b5060005b8381101561181d5760008382815181106116fe576116fe6127c7565b60200260200101515111156118155760005b838281518110611722576117226127c7565b60200260200101515181101561181357336001600160a01b031684838151811061174e5761174e6127c7565b6020026020010151600186858151811061176a5761176a6127c7565b60200260200101515161177d9190612934565b8151811061178d5761178d6127c7565b6020026020010151602001516001600160a01b03167f40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b18738685815181106117d5576117d56127c7565b602002602001015184815181106117ee576117ee6127c7565b60200260200101516040516118039190612ade565b60405180910390a3600101611710565b505b6001016116e2565b50505050505050505050565b61183161189a565b600180546001600160a01b0383166001600160a01b031990911681179091556118626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146104045760405163118cdaa760e01b8152336004820152602401610555565b6118cf611bed565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000807f88c1d2ecf185adf710588203a5f263f0ff61be0d33da39792cde19ba9aa4331e83600001518460200151856040015161195c8760600151611c17565b6080808901516040805160208101989098526001600160a01b03968716908801529490931660608601529184015260a083015260c082015260e0015b60408051601f1981840301815291905280516020909101209392505050565b600180546001600160a01b031916905561056781611ce2565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611a2957507f000000000000000000000000000000000000000000000000000000000000000046145b15611a5357507f000000000000000000000000000000000000000000000000000000000000000090565b610574604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b03611b98565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118ff3390565b60606105747f00000000000000000000000000000000000000000000000000000000000000006002611d32565b60606105747f00000000000000000000000000000000000000000000000000000000000000006003611d32565b600154600160a01b900460ff16156104045760405163d93c066560e01b815260040160405180910390fd5b600080600080611bd38686611ddd565b925092509250611be38282611e2a565b5090949350505050565b600154600160a01b900460ff1661040457604051638dfc202b60e01b815260040160405180910390fd5b60008082516001600160401b03811115611c3357611c336124ed565b604051908082528060200260200182016040528015611c5c578160200160208202803683370190505b50905060005b8351811015611cb257611c8d848281518110611c8057611c806127c7565b6020026020010151611ee7565b828281518110611c9f57611c9f6127c7565b6020908102919091010152600101611c62565b5080604051602001611cc49190612bcb565b60405160208183030381529060405280519060200120915050919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff8314611d4c57611d4583611f48565b9050610509565b818054611d5890612c01565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8490612c01565b8015611dd15780601f10611da657610100808354040283529160200191611dd1565b820191906000526020600020905b815481529060010190602001808311611db457829003601f168201915b50505050509050610509565b60008060008351604103611e175760208401516040850151606086015160001a611e0988828585611f87565b955095509550505050611e23565b50508151600091506002905b9250925092565b6000826003811115611e3e57611e3e612c3b565b03611e47575050565b6001826003811115611e5b57611e5b612c3b565b03611e795760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611e8d57611e8d612c3b565b03611eae5760405163fce698f760e01b815260048101829052602401610555565b6003826003811115611ec257611ec2612c3b565b03611ee3576040516335e2f38360e21b815260048101829052602401610555565b5050565b6000807f80ad7e1b04ee6d994a125f4714ca0720908bd80ed16063ec8aee4b88e9253e2d8360000151846020015180519060200120604051602001611998939291909283526001600160a01b03919091166020830152604082015260600190565b60606000611f5583612056565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611fc2575060009150600390508261204c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612016573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120425750600092506001915082905061204c565b9250600091508190505b9450945094915050565b600060ff8216601f81111561050957604051632cd44ac360e21b815260040160405180910390fd5b60006020828403121561209057600080fd5b5035919050565b6000602082840312156120a957600080fd5b81356001600160401b038111156120bf57600080fd5b820160c081850312156120d157600080fd5b9392505050565b60005b838110156120f35781810151838201526020016120db565b50506000910152565b600081518084526121148160208601602086016120d8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261214960e084018a6120fc565b838103604085015261215b818a6120fc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156121af57835183529284019291840191600101612193565b50909c9b505050505050505050505050565b6020815260006120d160208301846120fc565b60008083601f8401126121e657600080fd5b5081356001600160401b038111156121fd57600080fd5b6020830191508360208260051b850101111561221857600080fd5b9250929050565b6000806000806000806060878903121561223857600080fd5b86356001600160401b038082111561224f57600080fd5b61225b8a838b016121d4565b9098509650602089013591508082111561227457600080fd5b6122808a838b016121d4565b9096509450604089013591508082111561229957600080fd5b506122a689828a016121d4565b979a9699509497509295939492505050565b80356001600160a01b03811681146122cf57600080fd5b919050565b6000602082840312156122e657600080fd5b6120d1826122b8565b6000808335601e1984360301811261230657600080fd5b83016020810192503590506001600160401b0381111561232557600080fd5b80360382131561221857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008383855260208086019550808560051b830101846000805b8881101561240e57858403601f19018a52823536899003605e1901811261239c578283fd5b880160606001600160a01b036123b1836122b8565b1686526123c0878301836122ef565b82898901526123d28389018284612334565b9250505060406123e4818401846122ef565b9350878303828901526123f8838583612334565b9d89019d97505050938601935050600101612377565b509198975050505050505050565b6020815260006001600160a01b0380612434856122b8565b16602084015280612447602086016122b8565b16604084015250604083013560608301526060830135601e1984360301811261246f57600080fd5b83016020810190356001600160401b0381111561248b57600080fd5b8060051b360382131561249d57600080fd5b60c060808501526124b260e08501828461235d565b915050608084013560a08401526124cc60a08501856122ef565b848303601f190160c08601526124e3838284612334565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612525576125256124ed565b60405290565b60405160c081016001600160401b0381118282101715612525576125256124ed565b604051601f8201601f191681016001600160401b0381118282101715612575576125756124ed565b604052919050565b60006001600160401b03821115612596576125966124ed565b5060051b60200190565b60006001600160401b038211156125b9576125b96124ed565b50601f01601f191660200190565b600082601f8301126125d857600080fd5b81356125eb6125e6826125a0565b61254d565b81815284602083860101111561260057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261262e57600080fd5b8135602061263e6125e68361257d565b82815260059290921b8401810191818101908684111561265d57600080fd5b8286015b8481101561270c5780356001600160401b03808211156126815760008081fd5b908801906060828b03601f190181131561269b5760008081fd5b6126a3612503565b6126ae8885016122b8565b8152604080850135848111156126c45760008081fd5b6126d28e8b838901016125c7565b838b0152509184013591838311156126ea5760008081fd5b6126f88d8a858801016125c7565b908201528652505050918301918301612661565b509695505050505050565b600060c0828403121561272957600080fd5b61273161252b565b905061273c826122b8565b815261274a602083016122b8565b60208201526040820135604082015260608201356001600160401b038082111561277357600080fd5b61277f8583860161261d565b60608401526080840135608084015260a08401359150808211156127a257600080fd5b506127af848285016125c7565b60a08301525092915050565b60006105093683612717565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126127f457600080fd5b8301803591506001600160401b0382111561280e57600080fd5b60200191503681900382131561221857600080fd5b6000602080838503121561283657600080fd5b82356001600160401b038082111561284d57600080fd5b818501915085601f83011261286157600080fd5b813561286f6125e68261257d565b81815260059190911b8301840190848101908883111561288e57600080fd5b8585015b838110156128c6578035858111156128aa5760008081fd5b6128b88b89838a0101612717565b845250918601918601612892565b5098975050505050505050565b8281526040602082015260006128ec60408301846120fc565b949350505050565b60006020828403121561290657600080fd5b81516001600160e01b0319811681146120d157600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156105095761050961291e565b808201808211156105095761050961291e565b60e08152600061296d60e083018b6120fc565b828103602084015261297f818b6120fc565b9050886040840152828103606084015261299a81888a612334565b608084019690965250506001600160a01b0392831660a0820152911660c09091015295945050505050565b8381526040602082015260006129df604083018486612334565b95945050505050565b600060208083850312156129fb57600080fd5b82516001600160401b0380821115612a1257600080fd5b818501915085601f830112612a2657600080fd5b8151612a346125e68261257d565b81815260059190911b83018401908481019088831115612a5357600080fd5b8585015b838110156128c657805185811115612a6f5760008081fd5b8601603f81018b13612a815760008081fd5b878101516040612a936125e6836125a0565b8281528d82848601011115612aa85760008081fd5b612ab7838c83018487016120d8565b8652505050918601918601612a57565b600081612ad657612ad661291e565b506000190190565b602080825282516001600160a01b0390811683830152838201518116604080850191909152808501516060808601919091528086015160c06080870152805160e0870181905260009594610100600583901b8901810195919493870193919290890190885b81811015612b9d5760ff198b8903018352855187815116895289810151858b8b0152612b71868b01826120fc565b918701518a83038b890152919050612b8981836120fc565b995050509488019491880191600101612b43565b50505050505050608085015160a085015260a08501519150601f198482030160c08501526129df81836120fc565b815160009082906020808601845b83811015612bf557815185529382019390820190600101612bd9565b50929695505050505050565b600181811c90821680612c1557607f821691505b602082108103612c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122073f8fd2b36b643aff6f988638bc7c8ab2f41546c01a777524170b479e36618c564736f6c63430008170033';\n"]}
@@ -69,4 +69,6 @@ export declare const ABI_IERC7821: {
69
69
  }[];
70
70
  stateMutability: string;
71
71
  }[];
72
+ export declare const DELEGATION_MANAGER_ADDRESSES: string[];
73
+ export declare const CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS = "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806383ebb771116100ad578063acb8cc4911610071578063acb8cc491461027f578063cef6d2091461029f578063e30c3978146102b2578063f2fde38b146102c3578063ffa1ad74146102d657600080fd5b806383ebb771146102065780638456cb591461020e57806384b0196e146102165780638da5cb5b14610231578063a3f4df7e1461024257600080fd5b806358909ebc116100f457806358909ebc146101b05780635c975abb146101d157806366134607146101e3578063715018a6146101f657806379ba5097146101fe57600080fd5b80631b13cac2146101315780632d40d0521461014d5780633ed01015146101805780633f4ba83a14610195578063499340471461019d575b600080fd5b61013a60001981565b6040519081526020015b60405180910390f35b61017061015b36600461207e565b60046020526000908152604090205460ff1681565b6040519015158152602001610144565b61019361018e366004612097565b6102fa565b005b6101936103f4565b6101936101ab366004612097565b610406565b6101b9610a1181565b6040516001600160a01b039091168152602001610144565b600154600160a01b900460ff16610170565b61013a6101f1366004612097565b6104f6565b61019361050f565b610193610521565b61013a61056a565b610193610579565b61021e610589565b6040516101449796959493929190612128565b6000546001600160a01b03166101b9565b610272604051806040016040528060118152602001702232b632b3b0ba34b7b726b0b730b3b2b960791b81525081565b60405161014491906121c1565b610272604051806040016040528060018152602001603160f81b81525081565b6101936102ad36600461221f565b6105cf565b6001546001600160a01b03166101b9565b6101936102d13660046122d4565b611829565b610272604051806040016040528060058152602001640312e332e360dc1b81525081565b61030a60408201602083016122d4565b6001600160a01b03811633146103335760405163b9f0f17160e01b815260040160405180910390fd5b600061033e836104f6565b60008181526004602052604090205490915060ff1661037057604051637952fbad60e11b815260040160405180910390fd5b6000818152600460209081526040909120805460ff19169055610395908401846122d4565b6001600160a01b03166103ae60408501602086016122d4565b6001600160a01b0316827f3feadce88fc1b49db633a56fd5307ed6ee18734df83bcc4011daa720c9cd95f1866040516103e7919061241c565b60405180910390a4505050565b6103fc61189a565b6104046118c7565b565b61041660408201602083016122d4565b6001600160a01b038116331461043f5760405163b9f0f17160e01b815260040160405180910390fd5b600061044a836104f6565b60008181526004602052604090205490915060ff161561047c57604051625ecddb60e01b815260040160405180910390fd5b6000818152600460209081526040909120805460ff191660011790556104a4908401846122d4565b6001600160a01b03166104bd60408501602086016122d4565b6001600160a01b0316827fea589ba9473ee1fe77d352c7ed919747715a5d22931b972de9b02a907c66d5dd866040516103e7919061241c565b6000610509610504836127bb565b61191c565b92915050565b61051761189a565b61040460006119b7565b60015433906001600160a01b0316811461055e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b610567816119b7565b50565b60006105746119d0565b905090565b61058161189a565b610404611afb565b60006060806000806000606061059d611b3e565b6105a5611b6b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6105d7611b98565b8481811415806105e75750808414155b1561060557604051631bcaf69f60e01b815260040160405180910390fd5b6000816001600160401b0381111561061f5761061f6124ed565b60405190808252806020026020018201604052801561065257816020015b606081526020019060019003908161063d5790505b5090506000826001600160401b0381111561066f5761066f6124ed565b6040519080825280602002602001820160405280156106a257816020015b606081526020019060019003908161068d5790505b50905060005b83811015610c195760008a8a838181106106c4576106c46127c7565b90506020028101906106d691906127dd565b8101906106e39190612823565b905080516000036107d1576040805160008082526020820190925290610765565b6107526040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600080191681526020016060815260200160008152602001606081525090565b8152602001906001900390816107045790505b50848381518110610778576107786127c7565b602090810291909101015260006040519080825280602002602001820160405280156107ae578160200160208202803683370190505b508383815181106107c1576107c16127c7565b6020026020010181905250610c10565b808483815181106107e4576107e46127c7565b6020026020010181905250600081516001600160401b0381111561080a5761080a6124ed565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b50905080848481518110610849576108496127c7565b6020026020010181905250336001600160a01b031682600081518110610871576108716127c7565b6020026020010151600001516001600160a01b0316141580156108c65750610a116001600160a01b0316826000815181106108ae576108ae6127c7565b6020026020010151600001516001600160a01b031614155b156108e457604051632d618d8160e21b815260040160405180910390fd5b60005b8251811015610a4d576000838281518110610904576109046127c7565b602002602001015190506109178161191c565b838381518110610929576109296127c7565b60200260200101818152505080602001516001600160a01b03163b6000036109a657600061099e61099461095b61056a565b86868151811061096d5761096d6127c7565b602002602001015160405161190160f01b8152600281019290925260228201526042902090565b8360a00151611bc3565b905050610a44565b60006109c56109b361056a565b85858151811061096d5761096d6127c7565b9050600082602001516001600160a01b0316631626ba7e838560a001516040518363ffffffff1660e01b81526004016109ff9291906128d3565b602060405180830381865afa158015610a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4091906128f4565b5050505b506001016108e7565b5060005b8251811015610c0d5760046000838381518110610a7057610a706127c7565b60209081029190910181015182528101919091526040016000205460ff1615610aac576040516302dd502960e11b815260040160405180910390fd5b60018351610aba9190612934565b8114610bc35781610acc826001612947565b81518110610adc57610adc6127c7565b6020026020010151838281518110610af657610af66127c7565b60200260200101516040015114610b2057604051636f6a1b8760e11b815260040160405180910390fd5b600083610b2e836001612947565b81518110610b3e57610b3e6127c7565b6020026020010151600001519050610a116001600160a01b0316816001600160a01b031614158015610b9f5750806001600160a01b0316848381518110610b8757610b876127c7565b6020026020010151602001516001600160a01b031614155b15610bbd57604051632d618d8160e21b815260040160405180910390fd5b50610c05565b60001960001b838281518110610bdb57610bdb6127c7565b60200260200101516040015114610c0557604051636f6a1b8760e11b815260040160405180910390fd5b600101610a51565b50505b506001016106a8565b5060005b83811015610e3e576000838281518110610c3957610c396127c7565b6020026020010151511115610e365760005b838281518110610c5d57610c5d6127c7565b602002602001015151811015610e34576000848381518110610c8157610c816127c7565b60200260200101518281518110610c9a57610c9a6127c7565b602002602001015160600151905060005b8151811015610e2a576000828281518110610cc857610cc86127c7565b6020026020010151600001519050806001600160a01b031663414c3e33848481518110610cf757610cf76127c7565b602002602001015160200151858581518110610d1557610d156127c7565b6020026020010151604001518f8f8a818110610d3357610d336127c7565b905060200201358e8e8b818110610d4c57610d4c6127c7565b9050602002810190610d5e91906127dd565b8c8c81518110610d7057610d706127c7565b60200260200101518b81518110610d8957610d896127c7565b60200260200101518e8d81518110610da357610da36127c7565b60200260200101518c81518110610dbc57610dbc6127c7565b602002602001015160200151336040518963ffffffff1660e01b8152600401610dec98979695949392919061295a565b600060405180830381600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b5050505050806001019050610cab565b5050600101610c4b565b505b600101610c1d565b5060005b8381101561146257828181518110610e5c57610e5c6127c7565b602002602001015151600003610f1a573363d691c964898984818110610e8457610e846127c7565b90506020020135888885818110610e9d57610e9d6127c7565b9050602002810190610eaf91906127dd565b6040518463ffffffff1660e01b8152600401610ecd939291906129c5565b6000604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1491908101906129e8565b5061145a565b60005b838281518110610f2f57610f2f6127c7565b602002602001015151811015611106576000848381518110610f5357610f536127c7565b60200260200101518281518110610f6c57610f6c6127c7565b602002602001015160600151905060005b81518110156110fc576000828281518110610f9a57610f9a6127c7565b6020026020010151600001519050806001600160a01b031663a145832a848481518110610fc957610fc96127c7565b602002602001015160200151858581518110610fe757610fe76127c7565b6020026020010151604001518f8f8a818110611005576110056127c7565b905060200201358e8e8b81811061101e5761101e6127c7565b905060200281019061103091906127dd565b8c8c81518110611042576110426127c7565b60200260200101518b8151811061105b5761105b6127c7565b60200260200101518e8d81518110611075576110756127c7565b60200260200101518c8151811061108e5761108e6127c7565b602002602001015160200151336040518963ffffffff1660e01b81526004016110be98979695949392919061295a565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050505050806001019050610f7d565b5050600101610f1d565b50828181518110611119576111196127c7565b60200260200101516001848381518110611135576111356127c7565b6020026020010151516111489190612934565b81518110611158576111586127c7565b6020026020010151602001516001600160a01b031663d691c964898984818110611184576111846127c7565b9050602002013588888581811061119d5761119d6127c7565b90506020028101906111af91906127dd565b6040518463ffffffff1660e01b81526004016111cd939291906129c5565b6000604051808303816000875af11580156111ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261121491908101906129e8565b506000838281518110611229576112296127c7565b60200260200101515190505b801561145857600084838151811061124f5761124f6127c7565b60200260200101516001836112649190612934565b81518110611274576112746127c7565b60200260200101516060015190506000815190505b80156114455760008261129d600184612934565b815181106112ad576112ad6127c7565b6020026020010151600001519050806001600160a01b031663d3eddcc5846001856112d89190612934565b815181106112e8576112e86127c7565b602002602001015160200151856001866113029190612934565b81518110611312576113126127c7565b6020026020010151604001518f8f8a818110611330576113306127c7565b905060200201358e8e8b818110611349576113496127c7565b905060200281019061135b91906127dd565b8c8c8151811061136d5761136d6127c7565b602002602001015160018c6113829190612934565b81518110611392576113926127c7565b60200260200101518e8d815181106113ac576113ac6127c7565b602002602001015160018d6113c19190612934565b815181106113d1576113d16127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161140198979695949392919061295a565b600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050508061143e90612ac7565b9050611289565b50508061145190612ac7565b9050611235565b505b600101610e42565b5060005b838110156116de576000838281518110611482576114826127c7565b60200260200101515111156116d65760008382815181106114a5576114a56127c7565b60200260200101515190505b80156116d45760008483815181106114cb576114cb6127c7565b60200260200101516001836114e09190612934565b815181106114f0576114f06127c7565b60200260200101516060015190506000815190505b80156116c157600082611519600184612934565b81518110611529576115296127c7565b6020026020010151600001519050806001600160a01b031663ed463367846001856115549190612934565b81518110611564576115646127c7565b6020026020010151602001518560018661157e9190612934565b8151811061158e5761158e6127c7565b6020026020010151604001518f8f8a8181106115ac576115ac6127c7565b905060200201358e8e8b8181106115c5576115c56127c7565b90506020028101906115d791906127dd565b8c8c815181106115e9576115e96127c7565b602002602001015160018c6115fe9190612934565b8151811061160e5761160e6127c7565b60200260200101518e8d81518110611628576116286127c7565b602002602001015160018d61163d9190612934565b8151811061164d5761164d6127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161167d98979695949392919061295a565b600060405180830381600087803b15801561169757600080fd5b505af11580156116ab573d6000803e3d6000fd5b5050505050806116ba90612ac7565b9050611505565b5050806116cd90612ac7565b90506114b1565b505b600101611466565b5060005b8381101561181d5760008382815181106116fe576116fe6127c7565b60200260200101515111156118155760005b838281518110611722576117226127c7565b60200260200101515181101561181357336001600160a01b031684838151811061174e5761174e6127c7565b6020026020010151600186858151811061176a5761176a6127c7565b60200260200101515161177d9190612934565b8151811061178d5761178d6127c7565b6020026020010151602001516001600160a01b03167f40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b18738685815181106117d5576117d56127c7565b602002602001015184815181106117ee576117ee6127c7565b60200260200101516040516118039190612ade565b60405180910390a3600101611710565b505b6001016116e2565b50505050505050505050565b61183161189a565b600180546001600160a01b0383166001600160a01b031990911681179091556118626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146104045760405163118cdaa760e01b8152336004820152602401610555565b6118cf611bed565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000807f88c1d2ecf185adf710588203a5f263f0ff61be0d33da39792cde19ba9aa4331e83600001518460200151856040015161195c8760600151611c17565b6080808901516040805160208101989098526001600160a01b03968716908801529490931660608601529184015260a083015260c082015260e0015b60408051601f1981840301815291905280516020909101209392505050565b600180546001600160a01b031916905561056781611ce2565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611a2957507f000000000000000000000000000000000000000000000000000000000000000046145b15611a5357507f000000000000000000000000000000000000000000000000000000000000000090565b610574604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b03611b98565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118ff3390565b60606105747f00000000000000000000000000000000000000000000000000000000000000006002611d32565b60606105747f00000000000000000000000000000000000000000000000000000000000000006003611d32565b600154600160a01b900460ff16156104045760405163d93c066560e01b815260040160405180910390fd5b600080600080611bd38686611ddd565b925092509250611be38282611e2a565b5090949350505050565b600154600160a01b900460ff1661040457604051638dfc202b60e01b815260040160405180910390fd5b60008082516001600160401b03811115611c3357611c336124ed565b604051908082528060200260200182016040528015611c5c578160200160208202803683370190505b50905060005b8351811015611cb257611c8d848281518110611c8057611c806127c7565b6020026020010151611ee7565b828281518110611c9f57611c9f6127c7565b6020908102919091010152600101611c62565b5080604051602001611cc49190612bcb565b60405160208183030381529060405280519060200120915050919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff8314611d4c57611d4583611f48565b9050610509565b818054611d5890612c01565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8490612c01565b8015611dd15780601f10611da657610100808354040283529160200191611dd1565b820191906000526020600020905b815481529060010190602001808311611db457829003601f168201915b50505050509050610509565b60008060008351604103611e175760208401516040850151606086015160001a611e0988828585611f87565b955095509550505050611e23565b50508151600091506002905b9250925092565b6000826003811115611e3e57611e3e612c3b565b03611e47575050565b6001826003811115611e5b57611e5b612c3b565b03611e795760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611e8d57611e8d612c3b565b03611eae5760405163fce698f760e01b815260048101829052602401610555565b6003826003811115611ec257611ec2612c3b565b03611ee3576040516335e2f38360e21b815260048101829052602401610555565b5050565b6000807f80ad7e1b04ee6d994a125f4714ca0720908bd80ed16063ec8aee4b88e9253e2d8360000151846020015180519060200120604051602001611998939291909283526001600160a01b03919091166020830152604082015260600190565b60606000611f5583612056565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611fc2575060009150600390508261204c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612016573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120425750600092506001915082905061204c565b9250600091508190505b9450945094915050565b600060ff8216601f81111561050957604051632cd44ac360e21b815260040160405180910390fd5b60006020828403121561209057600080fd5b5035919050565b6000602082840312156120a957600080fd5b81356001600160401b038111156120bf57600080fd5b820160c081850312156120d157600080fd5b9392505050565b60005b838110156120f35781810151838201526020016120db565b50506000910152565b600081518084526121148160208601602086016120d8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261214960e084018a6120fc565b838103604085015261215b818a6120fc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156121af57835183529284019291840191600101612193565b50909c9b505050505050505050505050565b6020815260006120d160208301846120fc565b60008083601f8401126121e657600080fd5b5081356001600160401b038111156121fd57600080fd5b6020830191508360208260051b850101111561221857600080fd5b9250929050565b6000806000806000806060878903121561223857600080fd5b86356001600160401b038082111561224f57600080fd5b61225b8a838b016121d4565b9098509650602089013591508082111561227457600080fd5b6122808a838b016121d4565b9096509450604089013591508082111561229957600080fd5b506122a689828a016121d4565b979a9699509497509295939492505050565b80356001600160a01b03811681146122cf57600080fd5b919050565b6000602082840312156122e657600080fd5b6120d1826122b8565b6000808335601e1984360301811261230657600080fd5b83016020810192503590506001600160401b0381111561232557600080fd5b80360382131561221857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008383855260208086019550808560051b830101846000805b8881101561240e57858403601f19018a52823536899003605e1901811261239c578283fd5b880160606001600160a01b036123b1836122b8565b1686526123c0878301836122ef565b82898901526123d28389018284612334565b9250505060406123e4818401846122ef565b9350878303828901526123f8838583612334565b9d89019d97505050938601935050600101612377565b509198975050505050505050565b6020815260006001600160a01b0380612434856122b8565b16602084015280612447602086016122b8565b16604084015250604083013560608301526060830135601e1984360301811261246f57600080fd5b83016020810190356001600160401b0381111561248b57600080fd5b8060051b360382131561249d57600080fd5b60c060808501526124b260e08501828461235d565b915050608084013560a08401526124cc60a08501856122ef565b848303601f190160c08601526124e3838284612334565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612525576125256124ed565b60405290565b60405160c081016001600160401b0381118282101715612525576125256124ed565b604051601f8201601f191681016001600160401b0381118282101715612575576125756124ed565b604052919050565b60006001600160401b03821115612596576125966124ed565b5060051b60200190565b60006001600160401b038211156125b9576125b96124ed565b50601f01601f191660200190565b600082601f8301126125d857600080fd5b81356125eb6125e6826125a0565b61254d565b81815284602083860101111561260057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261262e57600080fd5b8135602061263e6125e68361257d565b82815260059290921b8401810191818101908684111561265d57600080fd5b8286015b8481101561270c5780356001600160401b03808211156126815760008081fd5b908801906060828b03601f190181131561269b5760008081fd5b6126a3612503565b6126ae8885016122b8565b8152604080850135848111156126c45760008081fd5b6126d28e8b838901016125c7565b838b0152509184013591838311156126ea5760008081fd5b6126f88d8a858801016125c7565b908201528652505050918301918301612661565b509695505050505050565b600060c0828403121561272957600080fd5b61273161252b565b905061273c826122b8565b815261274a602083016122b8565b60208201526040820135604082015260608201356001600160401b038082111561277357600080fd5b61277f8583860161261d565b60608401526080840135608084015260a08401359150808211156127a257600080fd5b506127af848285016125c7565b60a08301525092915050565b60006105093683612717565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126127f457600080fd5b8301803591506001600160401b0382111561280e57600080fd5b60200191503681900382131561221857600080fd5b6000602080838503121561283657600080fd5b82356001600160401b038082111561284d57600080fd5b818501915085601f83011261286157600080fd5b813561286f6125e68261257d565b81815260059190911b8301840190848101908883111561288e57600080fd5b8585015b838110156128c6578035858111156128aa5760008081fd5b6128b88b89838a0101612717565b845250918601918601612892565b5098975050505050505050565b8281526040602082015260006128ec60408301846120fc565b949350505050565b60006020828403121561290657600080fd5b81516001600160e01b0319811681146120d157600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156105095761050961291e565b808201808211156105095761050961291e565b60e08152600061296d60e083018b6120fc565b828103602084015261297f818b6120fc565b9050886040840152828103606084015261299a81888a612334565b608084019690965250506001600160a01b0392831660a0820152911660c09091015295945050505050565b8381526040602082015260006129df604083018486612334565b95945050505050565b600060208083850312156129fb57600080fd5b82516001600160401b0380821115612a1257600080fd5b818501915085601f830112612a2657600080fd5b8151612a346125e68261257d565b81815260059190911b83018401908481019088831115612a5357600080fd5b8585015b838110156128c657805185811115612a6f5760008081fd5b8601603f81018b13612a815760008081fd5b878101516040612a936125e6836125a0565b8281528d82848601011115612aa85760008081fd5b612ab7838c83018487016120d8565b8652505050918601918601612a57565b600081612ad657612ad661291e565b506000190190565b602080825282516001600160a01b0390811683830152838201518116604080850191909152808501516060808601919091528086015160c06080870152805160e0870181905260009594610100600583901b8901810195919493870193919290890190885b81811015612b9d5760ff198b8903018352855187815116895289810151858b8b0152612b71868b01826120fc565b918701518a83038b890152919050612b8981836120fc565b995050509488019491880191600101612b43565b50505050505050608085015160a085015260a08501519150601f198482030160c08501526129df81836120fc565b815160009082906020808601845b83811015612bf557815185529382019390820190600101612bd9565b50929695505050505050565b600181811c90821680612c1557607f821691505b602082108103612c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122073f8fd2b36b643aff6f988638bc7c8ab2f41546c01a777524170b479e36618c564736f6c63430008170033";
72
74
  //# sourceMappingURL=constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCZ,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAmBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAuBxC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;GAkBxB,CAAC"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCZ,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAmBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAuBxC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;GAkBxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAExC,CAAC;AAEF,eAAO,MAAM,2CAA2C,qxsBAC4tsB,CAAC"}
@@ -69,4 +69,6 @@ export declare const ABI_IERC7821: {
69
69
  }[];
70
70
  stateMutability: string;
71
71
  }[];
72
+ export declare const DELEGATION_MANAGER_ADDRESSES: string[];
73
+ export declare const CODE_DELEGATION_MANAGER_NO_SIGNATURE_ERRORS = "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806383ebb771116100ad578063acb8cc4911610071578063acb8cc491461027f578063cef6d2091461029f578063e30c3978146102b2578063f2fde38b146102c3578063ffa1ad74146102d657600080fd5b806383ebb771146102065780638456cb591461020e57806384b0196e146102165780638da5cb5b14610231578063a3f4df7e1461024257600080fd5b806358909ebc116100f457806358909ebc146101b05780635c975abb146101d157806366134607146101e3578063715018a6146101f657806379ba5097146101fe57600080fd5b80631b13cac2146101315780632d40d0521461014d5780633ed01015146101805780633f4ba83a14610195578063499340471461019d575b600080fd5b61013a60001981565b6040519081526020015b60405180910390f35b61017061015b36600461207e565b60046020526000908152604090205460ff1681565b6040519015158152602001610144565b61019361018e366004612097565b6102fa565b005b6101936103f4565b6101936101ab366004612097565b610406565b6101b9610a1181565b6040516001600160a01b039091168152602001610144565b600154600160a01b900460ff16610170565b61013a6101f1366004612097565b6104f6565b61019361050f565b610193610521565b61013a61056a565b610193610579565b61021e610589565b6040516101449796959493929190612128565b6000546001600160a01b03166101b9565b610272604051806040016040528060118152602001702232b632b3b0ba34b7b726b0b730b3b2b960791b81525081565b60405161014491906121c1565b610272604051806040016040528060018152602001603160f81b81525081565b6101936102ad36600461221f565b6105cf565b6001546001600160a01b03166101b9565b6101936102d13660046122d4565b611829565b610272604051806040016040528060058152602001640312e332e360dc1b81525081565b61030a60408201602083016122d4565b6001600160a01b03811633146103335760405163b9f0f17160e01b815260040160405180910390fd5b600061033e836104f6565b60008181526004602052604090205490915060ff1661037057604051637952fbad60e11b815260040160405180910390fd5b6000818152600460209081526040909120805460ff19169055610395908401846122d4565b6001600160a01b03166103ae60408501602086016122d4565b6001600160a01b0316827f3feadce88fc1b49db633a56fd5307ed6ee18734df83bcc4011daa720c9cd95f1866040516103e7919061241c565b60405180910390a4505050565b6103fc61189a565b6104046118c7565b565b61041660408201602083016122d4565b6001600160a01b038116331461043f5760405163b9f0f17160e01b815260040160405180910390fd5b600061044a836104f6565b60008181526004602052604090205490915060ff161561047c57604051625ecddb60e01b815260040160405180910390fd5b6000818152600460209081526040909120805460ff191660011790556104a4908401846122d4565b6001600160a01b03166104bd60408501602086016122d4565b6001600160a01b0316827fea589ba9473ee1fe77d352c7ed919747715a5d22931b972de9b02a907c66d5dd866040516103e7919061241c565b6000610509610504836127bb565b61191c565b92915050565b61051761189a565b61040460006119b7565b60015433906001600160a01b0316811461055e5760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b610567816119b7565b50565b60006105746119d0565b905090565b61058161189a565b610404611afb565b60006060806000806000606061059d611b3e565b6105a5611b6b565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b6105d7611b98565b8481811415806105e75750808414155b1561060557604051631bcaf69f60e01b815260040160405180910390fd5b6000816001600160401b0381111561061f5761061f6124ed565b60405190808252806020026020018201604052801561065257816020015b606081526020019060019003908161063d5790505b5090506000826001600160401b0381111561066f5761066f6124ed565b6040519080825280602002602001820160405280156106a257816020015b606081526020019060019003908161068d5790505b50905060005b83811015610c195760008a8a838181106106c4576106c46127c7565b90506020028101906106d691906127dd565b8101906106e39190612823565b905080516000036107d1576040805160008082526020820190925290610765565b6107526040518060c0016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600080191681526020016060815260200160008152602001606081525090565b8152602001906001900390816107045790505b50848381518110610778576107786127c7565b602090810291909101015260006040519080825280602002602001820160405280156107ae578160200160208202803683370190505b508383815181106107c1576107c16127c7565b6020026020010181905250610c10565b808483815181106107e4576107e46127c7565b6020026020010181905250600081516001600160401b0381111561080a5761080a6124ed565b604051908082528060200260200182016040528015610833578160200160208202803683370190505b50905080848481518110610849576108496127c7565b6020026020010181905250336001600160a01b031682600081518110610871576108716127c7565b6020026020010151600001516001600160a01b0316141580156108c65750610a116001600160a01b0316826000815181106108ae576108ae6127c7565b6020026020010151600001516001600160a01b031614155b156108e457604051632d618d8160e21b815260040160405180910390fd5b60005b8251811015610a4d576000838281518110610904576109046127c7565b602002602001015190506109178161191c565b838381518110610929576109296127c7565b60200260200101818152505080602001516001600160a01b03163b6000036109a657600061099e61099461095b61056a565b86868151811061096d5761096d6127c7565b602002602001015160405161190160f01b8152600281019290925260228201526042902090565b8360a00151611bc3565b905050610a44565b60006109c56109b361056a565b85858151811061096d5761096d6127c7565b9050600082602001516001600160a01b0316631626ba7e838560a001516040518363ffffffff1660e01b81526004016109ff9291906128d3565b602060405180830381865afa158015610a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4091906128f4565b5050505b506001016108e7565b5060005b8251811015610c0d5760046000838381518110610a7057610a706127c7565b60209081029190910181015182528101919091526040016000205460ff1615610aac576040516302dd502960e11b815260040160405180910390fd5b60018351610aba9190612934565b8114610bc35781610acc826001612947565b81518110610adc57610adc6127c7565b6020026020010151838281518110610af657610af66127c7565b60200260200101516040015114610b2057604051636f6a1b8760e11b815260040160405180910390fd5b600083610b2e836001612947565b81518110610b3e57610b3e6127c7565b6020026020010151600001519050610a116001600160a01b0316816001600160a01b031614158015610b9f5750806001600160a01b0316848381518110610b8757610b876127c7565b6020026020010151602001516001600160a01b031614155b15610bbd57604051632d618d8160e21b815260040160405180910390fd5b50610c05565b60001960001b838281518110610bdb57610bdb6127c7565b60200260200101516040015114610c0557604051636f6a1b8760e11b815260040160405180910390fd5b600101610a51565b50505b506001016106a8565b5060005b83811015610e3e576000838281518110610c3957610c396127c7565b6020026020010151511115610e365760005b838281518110610c5d57610c5d6127c7565b602002602001015151811015610e34576000848381518110610c8157610c816127c7565b60200260200101518281518110610c9a57610c9a6127c7565b602002602001015160600151905060005b8151811015610e2a576000828281518110610cc857610cc86127c7565b6020026020010151600001519050806001600160a01b031663414c3e33848481518110610cf757610cf76127c7565b602002602001015160200151858581518110610d1557610d156127c7565b6020026020010151604001518f8f8a818110610d3357610d336127c7565b905060200201358e8e8b818110610d4c57610d4c6127c7565b9050602002810190610d5e91906127dd565b8c8c81518110610d7057610d706127c7565b60200260200101518b81518110610d8957610d896127c7565b60200260200101518e8d81518110610da357610da36127c7565b60200260200101518c81518110610dbc57610dbc6127c7565b602002602001015160200151336040518963ffffffff1660e01b8152600401610dec98979695949392919061295a565b600060405180830381600087803b158015610e0657600080fd5b505af1158015610e1a573d6000803e3d6000fd5b5050505050806001019050610cab565b5050600101610c4b565b505b600101610c1d565b5060005b8381101561146257828181518110610e5c57610e5c6127c7565b602002602001015151600003610f1a573363d691c964898984818110610e8457610e846127c7565b90506020020135888885818110610e9d57610e9d6127c7565b9050602002810190610eaf91906127dd565b6040518463ffffffff1660e01b8152600401610ecd939291906129c5565b6000604051808303816000875af1158015610eec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f1491908101906129e8565b5061145a565b60005b838281518110610f2f57610f2f6127c7565b602002602001015151811015611106576000848381518110610f5357610f536127c7565b60200260200101518281518110610f6c57610f6c6127c7565b602002602001015160600151905060005b81518110156110fc576000828281518110610f9a57610f9a6127c7565b6020026020010151600001519050806001600160a01b031663a145832a848481518110610fc957610fc96127c7565b602002602001015160200151858581518110610fe757610fe76127c7565b6020026020010151604001518f8f8a818110611005576110056127c7565b905060200201358e8e8b81811061101e5761101e6127c7565b905060200281019061103091906127dd565b8c8c81518110611042576110426127c7565b60200260200101518b8151811061105b5761105b6127c7565b60200260200101518e8d81518110611075576110756127c7565b60200260200101518c8151811061108e5761108e6127c7565b602002602001015160200151336040518963ffffffff1660e01b81526004016110be98979695949392919061295a565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050505050806001019050610f7d565b5050600101610f1d565b50828181518110611119576111196127c7565b60200260200101516001848381518110611135576111356127c7565b6020026020010151516111489190612934565b81518110611158576111586127c7565b6020026020010151602001516001600160a01b031663d691c964898984818110611184576111846127c7565b9050602002013588888581811061119d5761119d6127c7565b90506020028101906111af91906127dd565b6040518463ffffffff1660e01b81526004016111cd939291906129c5565b6000604051808303816000875af11580156111ec573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261121491908101906129e8565b506000838281518110611229576112296127c7565b60200260200101515190505b801561145857600084838151811061124f5761124f6127c7565b60200260200101516001836112649190612934565b81518110611274576112746127c7565b60200260200101516060015190506000815190505b80156114455760008261129d600184612934565b815181106112ad576112ad6127c7565b6020026020010151600001519050806001600160a01b031663d3eddcc5846001856112d89190612934565b815181106112e8576112e86127c7565b602002602001015160200151856001866113029190612934565b81518110611312576113126127c7565b6020026020010151604001518f8f8a818110611330576113306127c7565b905060200201358e8e8b818110611349576113496127c7565b905060200281019061135b91906127dd565b8c8c8151811061136d5761136d6127c7565b602002602001015160018c6113829190612934565b81518110611392576113926127c7565b60200260200101518e8d815181106113ac576113ac6127c7565b602002602001015160018d6113c19190612934565b815181106113d1576113d16127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161140198979695949392919061295a565b600060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b50505050508061143e90612ac7565b9050611289565b50508061145190612ac7565b9050611235565b505b600101610e42565b5060005b838110156116de576000838281518110611482576114826127c7565b60200260200101515111156116d65760008382815181106114a5576114a56127c7565b60200260200101515190505b80156116d45760008483815181106114cb576114cb6127c7565b60200260200101516001836114e09190612934565b815181106114f0576114f06127c7565b60200260200101516060015190506000815190505b80156116c157600082611519600184612934565b81518110611529576115296127c7565b6020026020010151600001519050806001600160a01b031663ed463367846001856115549190612934565b81518110611564576115646127c7565b6020026020010151602001518560018661157e9190612934565b8151811061158e5761158e6127c7565b6020026020010151604001518f8f8a8181106115ac576115ac6127c7565b905060200201358e8e8b8181106115c5576115c56127c7565b90506020028101906115d791906127dd565b8c8c815181106115e9576115e96127c7565b602002602001015160018c6115fe9190612934565b8151811061160e5761160e6127c7565b60200260200101518e8d81518110611628576116286127c7565b602002602001015160018d61163d9190612934565b8151811061164d5761164d6127c7565b602002602001015160200151336040518963ffffffff1660e01b815260040161167d98979695949392919061295a565b600060405180830381600087803b15801561169757600080fd5b505af11580156116ab573d6000803e3d6000fd5b5050505050806116ba90612ac7565b9050611505565b5050806116cd90612ac7565b90506114b1565b505b600101611466565b5060005b8381101561181d5760008382815181106116fe576116fe6127c7565b60200260200101515111156118155760005b838281518110611722576117226127c7565b60200260200101515181101561181357336001600160a01b031684838151811061174e5761174e6127c7565b6020026020010151600186858151811061176a5761176a6127c7565b60200260200101515161177d9190612934565b8151811061178d5761178d6127c7565b6020026020010151602001516001600160a01b03167f40dadaa36c6c2e3d7317e24757451ffb2d603d875f0ad5e92c5dd156573b18738685815181106117d5576117d56127c7565b602002602001015184815181106117ee576117ee6127c7565b60200260200101516040516118039190612ade565b60405180910390a3600101611710565b505b6001016116e2565b50505050505050505050565b61183161189a565b600180546001600160a01b0383166001600160a01b031990911681179091556118626000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146104045760405163118cdaa760e01b8152336004820152602401610555565b6118cf611bed565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000807f88c1d2ecf185adf710588203a5f263f0ff61be0d33da39792cde19ba9aa4331e83600001518460200151856040015161195c8760600151611c17565b6080808901516040805160208101989098526001600160a01b03968716908801529490931660608601529184015260a083015260c082015260e0015b60408051601f1981840301815291905280516020909101209392505050565b600180546001600160a01b031916905561056781611ce2565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015611a2957507f000000000000000000000000000000000000000000000000000000000000000046145b15611a5357507f000000000000000000000000000000000000000000000000000000000000000090565b610574604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b611b03611b98565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118ff3390565b60606105747f00000000000000000000000000000000000000000000000000000000000000006002611d32565b60606105747f00000000000000000000000000000000000000000000000000000000000000006003611d32565b600154600160a01b900460ff16156104045760405163d93c066560e01b815260040160405180910390fd5b600080600080611bd38686611ddd565b925092509250611be38282611e2a565b5090949350505050565b600154600160a01b900460ff1661040457604051638dfc202b60e01b815260040160405180910390fd5b60008082516001600160401b03811115611c3357611c336124ed565b604051908082528060200260200182016040528015611c5c578160200160208202803683370190505b50905060005b8351811015611cb257611c8d848281518110611c8057611c806127c7565b6020026020010151611ee7565b828281518110611c9f57611c9f6127c7565b6020908102919091010152600101611c62565b5080604051602001611cc49190612bcb565b60405160208183030381529060405280519060200120915050919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff8314611d4c57611d4583611f48565b9050610509565b818054611d5890612c01565b80601f0160208091040260200160405190810160405280929190818152602001828054611d8490612c01565b8015611dd15780601f10611da657610100808354040283529160200191611dd1565b820191906000526020600020905b815481529060010190602001808311611db457829003601f168201915b50505050509050610509565b60008060008351604103611e175760208401516040850151606086015160001a611e0988828585611f87565b955095509550505050611e23565b50508151600091506002905b9250925092565b6000826003811115611e3e57611e3e612c3b565b03611e47575050565b6001826003811115611e5b57611e5b612c3b565b03611e795760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611e8d57611e8d612c3b565b03611eae5760405163fce698f760e01b815260048101829052602401610555565b6003826003811115611ec257611ec2612c3b565b03611ee3576040516335e2f38360e21b815260048101829052602401610555565b5050565b6000807f80ad7e1b04ee6d994a125f4714ca0720908bd80ed16063ec8aee4b88e9253e2d8360000151846020015180519060200120604051602001611998939291909283526001600160a01b03919091166020830152604082015260600190565b60606000611f5583612056565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611fc2575060009150600390508261204c565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015612016573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120425750600092506001915082905061204c565b9250600091508190505b9450945094915050565b600060ff8216601f81111561050957604051632cd44ac360e21b815260040160405180910390fd5b60006020828403121561209057600080fd5b5035919050565b6000602082840312156120a957600080fd5b81356001600160401b038111156120bf57600080fd5b820160c081850312156120d157600080fd5b9392505050565b60005b838110156120f35781810151838201526020016120db565b50506000910152565b600081518084526121148160208601602086016120d8565b601f01601f19169290920160200192915050565b60ff60f81b881681526000602060e0602084015261214960e084018a6120fc565b838103604085015261215b818a6120fc565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b818110156121af57835183529284019291840191600101612193565b50909c9b505050505050505050505050565b6020815260006120d160208301846120fc565b60008083601f8401126121e657600080fd5b5081356001600160401b038111156121fd57600080fd5b6020830191508360208260051b850101111561221857600080fd5b9250929050565b6000806000806000806060878903121561223857600080fd5b86356001600160401b038082111561224f57600080fd5b61225b8a838b016121d4565b9098509650602089013591508082111561227457600080fd5b6122808a838b016121d4565b9096509450604089013591508082111561229957600080fd5b506122a689828a016121d4565b979a9699509497509295939492505050565b80356001600160a01b03811681146122cf57600080fd5b919050565b6000602082840312156122e657600080fd5b6120d1826122b8565b6000808335601e1984360301811261230657600080fd5b83016020810192503590506001600160401b0381111561232557600080fd5b80360382131561221857600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008383855260208086019550808560051b830101846000805b8881101561240e57858403601f19018a52823536899003605e1901811261239c578283fd5b880160606001600160a01b036123b1836122b8565b1686526123c0878301836122ef565b82898901526123d28389018284612334565b9250505060406123e4818401846122ef565b9350878303828901526123f8838583612334565b9d89019d97505050938601935050600101612377565b509198975050505050505050565b6020815260006001600160a01b0380612434856122b8565b16602084015280612447602086016122b8565b16604084015250604083013560608301526060830135601e1984360301811261246f57600080fd5b83016020810190356001600160401b0381111561248b57600080fd5b8060051b360382131561249d57600080fd5b60c060808501526124b260e08501828461235d565b915050608084013560a08401526124cc60a08501856122ef565b848303601f190160c08601526124e3838284612334565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715612525576125256124ed565b60405290565b60405160c081016001600160401b0381118282101715612525576125256124ed565b604051601f8201601f191681016001600160401b0381118282101715612575576125756124ed565b604052919050565b60006001600160401b03821115612596576125966124ed565b5060051b60200190565b60006001600160401b038211156125b9576125b96124ed565b50601f01601f191660200190565b600082601f8301126125d857600080fd5b81356125eb6125e6826125a0565b61254d565b81815284602083860101111561260057600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261262e57600080fd5b8135602061263e6125e68361257d565b82815260059290921b8401810191818101908684111561265d57600080fd5b8286015b8481101561270c5780356001600160401b03808211156126815760008081fd5b908801906060828b03601f190181131561269b5760008081fd5b6126a3612503565b6126ae8885016122b8565b8152604080850135848111156126c45760008081fd5b6126d28e8b838901016125c7565b838b0152509184013591838311156126ea5760008081fd5b6126f88d8a858801016125c7565b908201528652505050918301918301612661565b509695505050505050565b600060c0828403121561272957600080fd5b61273161252b565b905061273c826122b8565b815261274a602083016122b8565b60208201526040820135604082015260608201356001600160401b038082111561277357600080fd5b61277f8583860161261d565b60608401526080840135608084015260a08401359150808211156127a257600080fd5b506127af848285016125c7565b60a08301525092915050565b60006105093683612717565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126127f457600080fd5b8301803591506001600160401b0382111561280e57600080fd5b60200191503681900382131561221857600080fd5b6000602080838503121561283657600080fd5b82356001600160401b038082111561284d57600080fd5b818501915085601f83011261286157600080fd5b813561286f6125e68261257d565b81815260059190911b8301840190848101908883111561288e57600080fd5b8585015b838110156128c6578035858111156128aa5760008081fd5b6128b88b89838a0101612717565b845250918601918601612892565b5098975050505050505050565b8281526040602082015260006128ec60408301846120fc565b949350505050565b60006020828403121561290657600080fd5b81516001600160e01b0319811681146120d157600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156105095761050961291e565b808201808211156105095761050961291e565b60e08152600061296d60e083018b6120fc565b828103602084015261297f818b6120fc565b9050886040840152828103606084015261299a81888a612334565b608084019690965250506001600160a01b0392831660a0820152911660c09091015295945050505050565b8381526040602082015260006129df604083018486612334565b95945050505050565b600060208083850312156129fb57600080fd5b82516001600160401b0380821115612a1257600080fd5b818501915085601f830112612a2657600080fd5b8151612a346125e68261257d565b81815260059190911b83018401908481019088831115612a5357600080fd5b8585015b838110156128c657805185811115612a6f5760008081fd5b8601603f81018b13612a815760008081fd5b878101516040612a936125e6836125a0565b8281528d82848601011115612aa85760008081fd5b612ab7838c83018487016120d8565b8652505050918601918601612a57565b600081612ad657612ad661291e565b506000190190565b602080825282516001600160a01b0390811683830152838201518116604080850191909152808501516060808601919091528086015160c06080870152805160e0870181905260009594610100600583901b8901810195919493870193919290890190885b81811015612b9d5760ff198b8903018352855187815116895289810151858b8b0152612b71868b01826120fc565b918701518a83038b890152919050612b8981836120fc565b995050509488019491880191600101612b43565b50505050505050608085015160a085015260a08501519150601f198482030160c08501526129df81836120fc565b815160009082906020808601845b83811015612bf557815185529382019390820190600101612bd9565b50929695505050505050565b600181811c90821680612c1557607f821691505b602082108103612c3557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122073f8fd2b36b643aff6f988638bc7c8ab2f41546c01a777524170b479e36618c564736f6c63430008170033";
72
74
  //# sourceMappingURL=constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCZ,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAmBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAuBxC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;GAkBxB,CAAC"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCZ,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAmBxC,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,4BAA4B;;;;;;;;;GAuBxC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;GAkBxB,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAExC,CAAC;AAEF,eAAO,MAAM,2CAA2C,qxsBAC4tsB,CAAC"}