@aa-sdk/core 4.35.0 → 4.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esm/account/smartContractAccount.d.ts +1 -1
- package/dist/esm/account/smartContractAccount.js.map +1 -1
- package/dist/esm/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/bundler/getSupportedEntryPoints.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/smartAccount/getAddress.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/signMessage.js.map +1 -1
- package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -1
- package/dist/esm/actions/smartAccount/signUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/types.js.map +1 -1
- package/dist/esm/actions/smartAccount/upgradeAccount.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/addBreadcrumb.js.map +1 -1
- package/dist/esm/client/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/esm/client/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/schema.d.ts +25 -25
- package/dist/esm/client/schema.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/ens/utils.js.map +1 -1
- package/dist/esm/entrypoint/0.6.d.ts +2 -2
- package/dist/esm/entrypoint/0.6.js.map +1 -1
- package/dist/esm/entrypoint/0.7.d.ts +1 -1
- package/dist/esm/entrypoint/0.7.js.map +1 -1
- package/dist/esm/entrypoint/index.d.ts +1 -1
- package/dist/esm/entrypoint/index.js.map +1 -1
- package/dist/esm/entrypoint/types.js.map +1 -1
- package/dist/esm/errors/account.js.map +1 -1
- package/dist/esm/errors/client.js.map +1 -1
- package/dist/esm/errors/entrypoint.js.map +1 -1
- package/dist/esm/errors/signer.js.map +1 -1
- package/dist/esm/errors/useroperation.js.map +1 -1
- package/dist/esm/middleware/actions.js.map +1 -1
- package/dist/esm/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/esm/middleware/defaults/7702signer.js +1 -1
- package/dist/esm/middleware/defaults/7702signer.js.map +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/esm/middleware/erc7677middleware.js.map +1 -1
- package/dist/esm/middleware/types.js.map +1 -1
- package/dist/esm/signer/local-account.d.ts +2 -207
- package/dist/esm/signer/local-account.js.map +1 -1
- package/dist/esm/signer/schema.d.ts +1 -1
- package/dist/esm/signer/types.js.map +1 -1
- package/dist/esm/signer/wallet-client.d.ts +2 -207
- package/dist/esm/signer/wallet-client.js.map +1 -1
- package/dist/esm/transport/split.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/defaults.js.map +1 -1
- package/dist/esm/utils/index.d.ts +2 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/stateOverride.js.map +1 -1
- package/dist/esm/utils/testUtils.js.map +1 -1
- package/dist/esm/utils/traceHeader.js.map +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/userop.d.ts +2 -2
- package/dist/esm/utils/userop.js +1 -1
- package/dist/esm/utils/userop.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/account/smartContractAccount.d.ts +1 -1
- package/dist/types/account/smartContractAccount.d.ts.map +1 -1
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/signUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/types.d.ts.map +1 -1
- package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/schema.d.ts +25 -25
- package/dist/types/client/schema.d.ts.map +1 -1
- package/dist/types/ens/utils.d.ts.map +1 -1
- package/dist/types/entrypoint/0.6.d.ts +2 -2
- package/dist/types/entrypoint/0.6.d.ts.map +1 -1
- package/dist/types/entrypoint/0.7.d.ts +1 -1
- package/dist/types/entrypoint/0.7.d.ts.map +1 -1
- package/dist/types/entrypoint/index.d.ts +1 -1
- package/dist/types/entrypoint/index.d.ts.map +1 -1
- package/dist/types/entrypoint/types.d.ts.map +1 -1
- package/dist/types/errors/useroperation.d.ts.map +1 -1
- package/dist/types/middleware/actions.d.ts.map +1 -1
- package/dist/types/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/types/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/types/middleware/types.d.ts.map +1 -1
- package/dist/types/signer/local-account.d.ts +2 -207
- package/dist/types/signer/local-account.d.ts.map +1 -1
- package/dist/types/signer/schema.d.ts +1 -1
- package/dist/types/signer/schema.d.ts.map +1 -1
- package/dist/types/signer/utils.d.ts.map +1 -1
- package/dist/types/signer/wallet-client.d.ts +2 -207
- package/dist/types/signer/wallet-client.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts.map +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/bytes.d.ts.map +1 -1
- package/dist/types/utils/defaults.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/testUtils.d.ts.map +1 -1
- package/dist/types/utils/traceHeader.d.ts.map +1 -1
- package/dist/types/utils/userop.d.ts +2 -2
- package/dist/types/utils/userop.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -6
- package/src/account/smartContractAccount.ts +27 -25
- package/src/actions/bundler/estimateUserOperationGas.ts +2 -2
- package/src/actions/bundler/getSupportedEntryPoints.ts +2 -2
- package/src/actions/bundler/getUserOperationByHash.ts +2 -2
- package/src/actions/bundler/getUserOperationReceipt.ts +2 -2
- package/src/actions/bundler/sendRawUserOperation.ts +2 -2
- package/src/actions/smartAccount/buildUserOperation.ts +5 -4
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +4 -3
- package/src/actions/smartAccount/buildUserOperationFromTxs.ts +9 -8
- package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +5 -4
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +7 -6
- package/src/actions/smartAccount/estimateUserOperationGas.ts +5 -4
- package/src/actions/smartAccount/getAddress.ts +2 -2
- package/src/actions/smartAccount/internal/initUserOperation.ts +7 -6
- package/src/actions/smartAccount/internal/runMiddlewareStack.ts +13 -12
- package/src/actions/smartAccount/internal/sendUserOperation.ts +3 -2
- package/src/actions/smartAccount/sendTransaction.ts +5 -4
- package/src/actions/smartAccount/sendTransactions.ts +3 -3
- package/src/actions/smartAccount/sendUserOperation.ts +4 -3
- package/src/actions/smartAccount/signMessage.ts +3 -3
- package/src/actions/smartAccount/signTypedData.ts +3 -3
- package/src/actions/smartAccount/signUserOperation.ts +4 -3
- package/src/actions/smartAccount/types.ts +23 -15
- package/src/actions/smartAccount/upgradeAccount.ts +3 -3
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +5 -5
- package/src/client/addBreadcrumb.ts +1 -1
- package/src/client/bundlerClient.ts +5 -5
- package/src/client/decorators/bundlerClient.ts +7 -7
- package/src/client/decorators/smartAccountClient.ts +20 -18
- package/src/client/isSmartAccountClient.ts +4 -4
- package/src/client/schema.ts +2 -2
- package/src/client/smartAccountClient.ts +14 -14
- package/src/client/types.ts +2 -2
- package/src/ens/utils.ts +1 -1
- package/src/entrypoint/0.6.ts +3 -3
- package/src/entrypoint/0.7.ts +4 -4
- package/src/entrypoint/index.ts +10 -9
- package/src/entrypoint/types.ts +30 -28
- package/src/errors/account.ts +1 -1
- package/src/errors/client.ts +3 -3
- package/src/errors/entrypoint.ts +2 -2
- package/src/errors/signer.ts +1 -1
- package/src/errors/useroperation.ts +6 -3
- package/src/middleware/actions.ts +3 -3
- package/src/middleware/defaults/7702gasEstimator.ts +4 -4
- package/src/middleware/defaults/7702signer.ts +3 -3
- package/src/middleware/defaults/feeEstimator.ts +4 -4
- package/src/middleware/defaults/gasEstimator.ts +6 -6
- package/src/middleware/defaults/paymasterAndData.ts +1 -1
- package/src/middleware/defaults/userOpSigner.ts +2 -2
- package/src/middleware/erc7677middleware.ts +9 -9
- package/src/middleware/types.ts +7 -5
- package/src/signer/local-account.ts +7 -7
- package/src/signer/types.ts +3 -3
- package/src/signer/wallet-client.ts +2 -2
- package/src/transport/split.ts +1 -1
- package/src/types.ts +29 -29
- package/src/utils/bigint.ts +4 -4
- package/src/utils/defaults.ts +1 -1
- package/src/utils/index.ts +12 -9
- package/src/utils/schema.ts +2 -2
- package/src/utils/stateOverride.ts +4 -4
- package/src/utils/testUtils.ts +2 -2
- package/src/utils/traceHeader.ts +14 -11
- package/src/utils/types.ts +1 -1
- package/src/utils/userop.ts +17 -17
- package/src/version.ts +1 -1
|
@@ -48,22 +48,24 @@ export enum DeploymentState {
|
|
|
48
48
|
|
|
49
49
|
export type GetEntryPointFromAccount<
|
|
50
50
|
TAccount extends SmartContractAccount | undefined,
|
|
51
|
-
TAccountOverride extends SmartContractAccount = SmartContractAccount
|
|
52
|
-
> =
|
|
53
|
-
TAccount,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
TAccountOverride extends SmartContractAccount = SmartContractAccount,
|
|
52
|
+
> =
|
|
53
|
+
GetAccountParameter<TAccount, TAccountOverride> extends SmartContractAccount<
|
|
54
|
+
string,
|
|
55
|
+
infer TEntryPointVersion
|
|
56
|
+
>
|
|
57
|
+
? TEntryPointVersion
|
|
58
|
+
: EntryPointVersion;
|
|
58
59
|
|
|
59
60
|
export type GetAccountParameter<
|
|
60
61
|
TAccount extends SmartContractAccount | undefined =
|
|
61
62
|
| SmartContractAccount
|
|
62
63
|
| undefined,
|
|
63
|
-
TAccountOverride extends SmartContractAccount = SmartContractAccount
|
|
64
|
-
> =
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
TAccountOverride extends SmartContractAccount = SmartContractAccount,
|
|
65
|
+
> =
|
|
66
|
+
IsUndefined<TAccount> extends true
|
|
67
|
+
? { account: TAccountOverride }
|
|
68
|
+
: { account?: TAccountOverride };
|
|
67
69
|
|
|
68
70
|
export type UpgradeToAndCallParams = {
|
|
69
71
|
upgradeToAddress: Address;
|
|
@@ -73,7 +75,7 @@ export type UpgradeToAndCallParams = {
|
|
|
73
75
|
export type SmartContractAccountWithSigner<
|
|
74
76
|
Name extends string = string,
|
|
75
77
|
TSigner extends SmartAccountSigner = SmartAccountSigner,
|
|
76
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
78
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
77
79
|
> = SmartContractAccount<Name, TEntryPointVersion> & {
|
|
78
80
|
getSigner: () => TSigner;
|
|
79
81
|
};
|
|
@@ -94,7 +96,7 @@ export type SmartContractAccountWithSigner<
|
|
|
94
96
|
* @returns {boolean} true if the account has a signer, otherwise false.
|
|
95
97
|
*/
|
|
96
98
|
export const isSmartAccountWithSigner = (
|
|
97
|
-
account: SmartContractAccount
|
|
99
|
+
account: SmartContractAccount,
|
|
98
100
|
): account is SmartContractAccountWithSigner => {
|
|
99
101
|
return "getSigner" in account;
|
|
100
102
|
};
|
|
@@ -102,7 +104,7 @@ export const isSmartAccountWithSigner = (
|
|
|
102
104
|
// [!region SmartContractAccount]
|
|
103
105
|
export type SmartContractAccount<
|
|
104
106
|
Name extends string = string,
|
|
105
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
107
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
106
108
|
> = LocalAccount<Name> & {
|
|
107
109
|
source: Name;
|
|
108
110
|
getDummySignature: () => Hex | Promise<Hex>;
|
|
@@ -112,9 +114,9 @@ export type SmartContractAccount<
|
|
|
112
114
|
signMessageWith6492: (params: { message: SignableMessage }) => Promise<Hex>;
|
|
113
115
|
signTypedDataWith6492: <
|
|
114
116
|
const typedData extends TypedData | Record<string, unknown>,
|
|
115
|
-
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData
|
|
117
|
+
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
|
|
116
118
|
>(
|
|
117
|
-
typedDataDefinition: TypedDataDefinition<typedData, primaryType
|
|
119
|
+
typedDataDefinition: TypedDataDefinition<typedData, primaryType>,
|
|
118
120
|
) => Promise<Hex>;
|
|
119
121
|
encodeUpgradeToAndCall: (params: UpgradeToAndCallParams) => Promise<Hex>;
|
|
120
122
|
getAccountNonce(nonceKey?: bigint): Promise<bigint>;
|
|
@@ -140,7 +142,7 @@ export type ToSmartContractAccountParams<
|
|
|
140
142
|
Name extends string = string,
|
|
141
143
|
TTransport extends Transport = Transport,
|
|
142
144
|
TChain extends Chain = Chain,
|
|
143
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
145
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
144
146
|
> = {
|
|
145
147
|
source: Name;
|
|
146
148
|
transport: TTransport;
|
|
@@ -173,7 +175,7 @@ export type ToSmartContractAccountParams<
|
|
|
173
175
|
* @returns {[Address, Hex]} A tuple containing the parsed factory address and factory calldata
|
|
174
176
|
*/
|
|
175
177
|
export const parseFactoryAddressFromAccountInitCode = (
|
|
176
|
-
initCode: Hex
|
|
178
|
+
initCode: Hex,
|
|
177
179
|
): [Address, Hex] => {
|
|
178
180
|
const factoryAddress: Address = `0x${initCode.substring(2, 42)}`;
|
|
179
181
|
const factoryCalldata: Hex = `0x${initCode.substring(42)}`;
|
|
@@ -230,12 +232,12 @@ export const getAccountAddress = async ({
|
|
|
230
232
|
} catch (err: any) {
|
|
231
233
|
Logger.verbose(
|
|
232
234
|
"[BaseSmartContractAccount](getAddress) getSenderAddress err: ",
|
|
233
|
-
err
|
|
235
|
+
err,
|
|
234
236
|
);
|
|
235
237
|
if (err.cause?.data?.errorName === "SenderAddressResult") {
|
|
236
238
|
Logger.verbose(
|
|
237
239
|
"[BaseSmartContractAccount](getAddress) entryPoint.getSenderAddress result:",
|
|
238
|
-
err.cause.data.args[0]
|
|
240
|
+
err.cause.data.args[0],
|
|
239
241
|
);
|
|
240
242
|
|
|
241
243
|
return err.cause.data.args[0] as Address;
|
|
@@ -254,7 +256,7 @@ export async function toSmartContractAccount<
|
|
|
254
256
|
Name extends string = string,
|
|
255
257
|
TTransport extends Transport = Transport,
|
|
256
258
|
TChain extends Chain = Chain,
|
|
257
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
259
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
258
260
|
>({
|
|
259
261
|
transport,
|
|
260
262
|
chain,
|
|
@@ -331,7 +333,7 @@ export async function toSmartContractAccount<
|
|
|
331
333
|
* @returns {Promise<SmartContractAccount>} a promise that resolves to a SmartContractAccount object with methods and properties for interacting with the smart contract account
|
|
332
334
|
*/
|
|
333
335
|
export async function toSmartContractAccount(
|
|
334
|
-
params: ToSmartContractAccountParams
|
|
336
|
+
params: ToSmartContractAccountParams,
|
|
335
337
|
): Promise<SmartContractAccount> {
|
|
336
338
|
const {
|
|
337
339
|
transport,
|
|
@@ -463,9 +465,9 @@ export async function toSmartContractAccount(
|
|
|
463
465
|
|
|
464
466
|
const signTypedDataWith6492 = async <
|
|
465
467
|
const typedData extends TypedData | Record<string, unknown>,
|
|
466
|
-
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData
|
|
468
|
+
primaryType extends keyof typedData | "EIP712Domain" = keyof typedData,
|
|
467
469
|
>(
|
|
468
|
-
typedDataDefinition: TypedDataDefinition<typedData, primaryType
|
|
470
|
+
typedDataDefinition: TypedDataDefinition<typedData, primaryType>,
|
|
469
471
|
): Promise<Hex> => {
|
|
470
472
|
const [isDeployed, signature] = await Promise.all([
|
|
471
473
|
isAccountDeployed(),
|
|
@@ -487,7 +489,7 @@ export async function toSmartContractAccount(
|
|
|
487
489
|
if (storage == null) {
|
|
488
490
|
throw new FailedToGetStorageSlotError(
|
|
489
491
|
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc",
|
|
490
|
-
"Proxy Implementation Address"
|
|
492
|
+
"Proxy Implementation Address",
|
|
491
493
|
);
|
|
492
494
|
}
|
|
493
495
|
|
|
@@ -9,14 +9,14 @@ import { serializeStateOverride } from "../../utils/stateOverride.js";
|
|
|
9
9
|
|
|
10
10
|
export const estimateUserOperationGas = async <
|
|
11
11
|
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,
|
|
12
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
12
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
13
13
|
>(
|
|
14
14
|
client: TClient,
|
|
15
15
|
args: {
|
|
16
16
|
request: UserOperationRequest<TEntryPointVersion>;
|
|
17
17
|
entryPoint: Address;
|
|
18
18
|
stateOverride?: StateOverride;
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
20
|
): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>> => {
|
|
21
21
|
return client.request({
|
|
22
22
|
method: "eth_estimateUserOperationGas",
|
|
@@ -2,9 +2,9 @@ import type { Address, Chain, Client, Transport } from "viem";
|
|
|
2
2
|
import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
3
3
|
|
|
4
4
|
export const getSupportedEntryPoints = async <
|
|
5
|
-
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema
|
|
5
|
+
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,
|
|
6
6
|
>(
|
|
7
|
-
client: TClient
|
|
7
|
+
client: TClient,
|
|
8
8
|
): Promise<Address[]> => {
|
|
9
9
|
return client.request({
|
|
10
10
|
method: "eth_supportedEntryPoints",
|
|
@@ -3,12 +3,12 @@ import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
|
3
3
|
import type { UserOperationResponse } from "../../types";
|
|
4
4
|
|
|
5
5
|
export const getUserOperationByHash = async <
|
|
6
|
-
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema
|
|
6
|
+
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,
|
|
7
7
|
>(
|
|
8
8
|
client: TClient,
|
|
9
9
|
args: {
|
|
10
10
|
hash: Hex;
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
12
|
): Promise<UserOperationResponse | null> => {
|
|
13
13
|
return client.request({
|
|
14
14
|
method: "eth_getUserOperationByHash",
|
|
@@ -3,12 +3,12 @@ import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
|
3
3
|
import type { UserOperationReceipt } from "../../types";
|
|
4
4
|
|
|
5
5
|
export const getUserOperationReceipt = async <
|
|
6
|
-
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema
|
|
6
|
+
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,
|
|
7
7
|
>(
|
|
8
8
|
client: TClient,
|
|
9
9
|
args: {
|
|
10
10
|
hash: Hex;
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
12
|
): Promise<UserOperationReceipt | null> => {
|
|
13
13
|
return client.request({
|
|
14
14
|
method: "eth_getUserOperationReceipt",
|
|
@@ -5,13 +5,13 @@ import type { UserOperationRequest } from "../../types";
|
|
|
5
5
|
|
|
6
6
|
export const sendRawUserOperation = async <
|
|
7
7
|
TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,
|
|
8
|
-
TEntryPointVersion extends EntryPointVersion = EntryPointVersion
|
|
8
|
+
TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
|
|
9
9
|
>(
|
|
10
10
|
client: TClient,
|
|
11
11
|
args: {
|
|
12
12
|
request: UserOperationRequest<TEntryPointVersion>;
|
|
13
13
|
entryPoint: Address;
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
15
|
): Promise<Hex> => {
|
|
16
16
|
return client.request({
|
|
17
17
|
method: "eth_sendUserOperation",
|
|
@@ -48,10 +48,11 @@ export async function buildUserOperation<
|
|
|
48
48
|
TContext extends UserOperationContext | undefined =
|
|
49
49
|
| UserOperationContext
|
|
50
50
|
| undefined,
|
|
51
|
-
TEntryPointVersion extends
|
|
51
|
+
TEntryPointVersion extends
|
|
52
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
52
53
|
>(
|
|
53
54
|
client_: Client<TTransport, TChain, TAccount>,
|
|
54
|
-
args: BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion
|
|
55
|
+
args: BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>,
|
|
55
56
|
): Promise<UserOperationStruct<TEntryPointVersion>> {
|
|
56
57
|
const client = clientHeaderTrack(client_, USER_OPERATION_METHOD);
|
|
57
58
|
const { account = client.account, overrides, context } = args;
|
|
@@ -63,7 +64,7 @@ export async function buildUserOperation<
|
|
|
63
64
|
throw new IncompatibleClientError(
|
|
64
65
|
"BaseSmartAccountClient",
|
|
65
66
|
USER_OPERATION_METHOD,
|
|
66
|
-
client
|
|
67
|
+
client,
|
|
67
68
|
);
|
|
68
69
|
}
|
|
69
70
|
|
|
@@ -73,6 +74,6 @@ export async function buildUserOperation<
|
|
|
73
74
|
overrides,
|
|
74
75
|
account,
|
|
75
76
|
context,
|
|
76
|
-
})
|
|
77
|
+
}),
|
|
77
78
|
);
|
|
78
79
|
}
|
|
@@ -68,12 +68,13 @@ export async function buildUserOperationFromTx<
|
|
|
68
68
|
TContext extends UserOperationContext | undefined =
|
|
69
69
|
| UserOperationContext
|
|
70
70
|
| undefined,
|
|
71
|
-
TEntryPointVersion extends
|
|
71
|
+
TEntryPointVersion extends
|
|
72
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
72
73
|
>(
|
|
73
74
|
client_: Client<Transport, TChain, TAccount>,
|
|
74
75
|
args: SendTransactionParameters<TChain, TAccount, TChainOverride>,
|
|
75
76
|
overrides?: UserOperationOverrides<TEntryPointVersion>,
|
|
76
|
-
context?: TContext
|
|
77
|
+
context?: TContext,
|
|
77
78
|
): Promise<UserOperationStruct<TEntryPointVersion>> {
|
|
78
79
|
const client = clientHeaderTrack(client_, "buildUserOperationFromTx");
|
|
79
80
|
const { account = client.account, ...request } = args;
|
|
@@ -89,7 +90,7 @@ export async function buildUserOperationFromTx<
|
|
|
89
90
|
throw new IncompatibleClientError(
|
|
90
91
|
"BaseSmartAccountClient",
|
|
91
92
|
"buildUserOperationFromTx",
|
|
92
|
-
client
|
|
93
|
+
client,
|
|
93
94
|
);
|
|
94
95
|
}
|
|
95
96
|
|
|
@@ -77,13 +77,14 @@ export async function buildUserOperationFromTxs<
|
|
|
77
77
|
TAccount extends SmartContractAccount | undefined =
|
|
78
78
|
| SmartContractAccount
|
|
79
79
|
| undefined,
|
|
80
|
-
TEntryPointVersion extends
|
|
80
|
+
TEntryPointVersion extends
|
|
81
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
81
82
|
TContext extends UserOperationContext | undefined =
|
|
82
83
|
| UserOperationContext
|
|
83
|
-
| undefined
|
|
84
|
+
| undefined,
|
|
84
85
|
>(
|
|
85
86
|
client_: Client<TTransport, TChain, TAccount>,
|
|
86
|
-
args: BuildTransactionParameters<TAccount, TContext, TEntryPointVersion
|
|
87
|
+
args: BuildTransactionParameters<TAccount, TContext, TEntryPointVersion>,
|
|
87
88
|
): Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>> {
|
|
88
89
|
const client = clientHeaderTrack(client_, "buildUserOperationFromTxs");
|
|
89
90
|
const { account = client.account, requests, overrides, context } = args;
|
|
@@ -95,7 +96,7 @@ export async function buildUserOperationFromTxs<
|
|
|
95
96
|
throw new IncompatibleClientError(
|
|
96
97
|
"BaseSmartAccountClient",
|
|
97
98
|
"buildUserOperationFromTxs",
|
|
98
|
-
client
|
|
99
|
+
client,
|
|
99
100
|
);
|
|
100
101
|
}
|
|
101
102
|
|
|
@@ -119,8 +120,8 @@ export async function buildUserOperationFromTxs<
|
|
|
119
120
|
overrides?.maxFeePerGas != null
|
|
120
121
|
? overrides?.maxFeePerGas
|
|
121
122
|
: mfpgOverridesInTx().length > 0
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
? bigIntMax(...mfpgOverridesInTx())
|
|
124
|
+
: undefined;
|
|
124
125
|
|
|
125
126
|
const mpfpgOverridesInTx = () =>
|
|
126
127
|
requests
|
|
@@ -130,8 +131,8 @@ export async function buildUserOperationFromTxs<
|
|
|
130
131
|
overrides?.maxPriorityFeePerGas != null
|
|
131
132
|
? overrides?.maxPriorityFeePerGas
|
|
132
133
|
: mpfpgOverridesInTx().length > 0
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
? bigIntMax(...mpfpgOverridesInTx())
|
|
135
|
+
: undefined;
|
|
135
136
|
|
|
136
137
|
const _overrides = {
|
|
137
138
|
maxFeePerGas,
|
|
@@ -18,7 +18,8 @@ export type CheckGasSponsorshipEligibilityResult<
|
|
|
18
18
|
TAccount extends SmartContractAccount | undefined =
|
|
19
19
|
| SmartContractAccount
|
|
20
20
|
| undefined,
|
|
21
|
-
TEntryPointVersion extends
|
|
21
|
+
TEntryPointVersion extends
|
|
22
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
22
23
|
> = {
|
|
23
24
|
eligible: boolean;
|
|
24
25
|
request?: UserOperationStruct<TEntryPointVersion>;
|
|
@@ -60,10 +61,10 @@ export function checkGasSponsorshipEligibility<
|
|
|
60
61
|
| undefined,
|
|
61
62
|
TContext extends UserOperationContext | undefined =
|
|
62
63
|
| UserOperationContext
|
|
63
|
-
| undefined
|
|
64
|
+
| undefined,
|
|
64
65
|
>(
|
|
65
66
|
client_: Client<TTransport, TChain, TAccount>,
|
|
66
|
-
args: SendUserOperationParameters<TAccount, TContext
|
|
67
|
+
args: SendUserOperationParameters<TAccount, TContext>,
|
|
67
68
|
): Promise<CheckGasSponsorshipEligibilityResult<TAccount>> {
|
|
68
69
|
const client = clientHeaderTrack(client_, "checkGasSponsorshipEligibility");
|
|
69
70
|
const { account = client.account, overrides, context } = args;
|
|
@@ -76,7 +77,7 @@ export function checkGasSponsorshipEligibility<
|
|
|
76
77
|
throw new IncompatibleClientError(
|
|
77
78
|
"BaseSmartAccountClient",
|
|
78
79
|
"checkGasSponsorshipEligibility",
|
|
79
|
-
client
|
|
80
|
+
client,
|
|
80
81
|
);
|
|
81
82
|
}
|
|
82
83
|
|
|
@@ -56,10 +56,11 @@ export async function dropAndReplaceUserOperation<
|
|
|
56
56
|
TContext extends UserOperationContext | undefined =
|
|
57
57
|
| UserOperationContext
|
|
58
58
|
| undefined,
|
|
59
|
-
TEntryPointVersion extends
|
|
59
|
+
TEntryPointVersion extends
|
|
60
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
60
61
|
>(
|
|
61
62
|
client_: Client<TTransport, TChain, TAccount>,
|
|
62
|
-
args: DropAndReplaceUserOperationParameters<TAccount, TContext
|
|
63
|
+
args: DropAndReplaceUserOperationParameters<TAccount, TContext>,
|
|
63
64
|
): Promise<SendUserOperationResult<TEntryPointVersion>> {
|
|
64
65
|
const client = clientHeaderTrack(client_, "dropAndReplaceUserOperation");
|
|
65
66
|
const { account = client.account, uoToDrop, overrides, context } = args;
|
|
@@ -70,7 +71,7 @@ export async function dropAndReplaceUserOperation<
|
|
|
70
71
|
throw new IncompatibleClientError(
|
|
71
72
|
"BaseSmartAccountClient",
|
|
72
73
|
"dropAndReplaceUserOperation",
|
|
73
|
-
client
|
|
74
|
+
client,
|
|
74
75
|
);
|
|
75
76
|
}
|
|
76
77
|
|
|
@@ -105,18 +106,18 @@ export async function dropAndReplaceUserOperation<
|
|
|
105
106
|
// however, we have migrated to using erc7677middleware for alchemy paymaster flows
|
|
106
107
|
// and most of the other paymasters we've seen don't do fee estimation
|
|
107
108
|
const { maxFeePerGas, maxPriorityFeePerGas } = await resolveProperties(
|
|
108
|
-
await client.middleware.feeEstimator(uoToSubmit, { account, client })
|
|
109
|
+
await client.middleware.feeEstimator(uoToSubmit, { account, client }),
|
|
109
110
|
);
|
|
110
111
|
|
|
111
112
|
const _overrides = {
|
|
112
113
|
...overrides,
|
|
113
114
|
maxFeePerGas: bigIntMax(
|
|
114
115
|
BigInt(maxFeePerGas ?? 0n),
|
|
115
|
-
bigIntMultiply(uoToDrop.maxFeePerGas, 1.1)
|
|
116
|
+
bigIntMultiply(uoToDrop.maxFeePerGas, 1.1),
|
|
116
117
|
),
|
|
117
118
|
maxPriorityFeePerGas: bigIntMax(
|
|
118
119
|
BigInt(maxPriorityFeePerGas ?? 0n),
|
|
119
|
-
bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1)
|
|
120
|
+
bigIntMultiply(uoToDrop.maxPriorityFeePerGas, 1.1),
|
|
120
121
|
),
|
|
121
122
|
} as UserOperationOverrides<TEntryPointVersion>;
|
|
122
123
|
|
|
@@ -37,10 +37,11 @@ export async function estimateUserOperationGas<
|
|
|
37
37
|
TContext extends UserOperationContext | undefined =
|
|
38
38
|
| UserOperationContext
|
|
39
39
|
| undefined,
|
|
40
|
-
TEntryPointVersion extends
|
|
40
|
+
TEntryPointVersion extends
|
|
41
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
41
42
|
>(
|
|
42
43
|
client_: Client<TTransport, TChain, TAccount>,
|
|
43
|
-
args: SendUserOperationParameters<TAccount, TContext
|
|
44
|
+
args: SendUserOperationParameters<TAccount, TContext>,
|
|
44
45
|
): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>> {
|
|
45
46
|
const client = clientHeaderTrack(client_, "estimateUserOperationGas");
|
|
46
47
|
const { account = client.account, overrides } = args;
|
|
@@ -52,7 +53,7 @@ export async function estimateUserOperationGas<
|
|
|
52
53
|
throw new IncompatibleClientError(
|
|
53
54
|
"BaseSmartAccountClient",
|
|
54
55
|
"estimateUserOperationGas",
|
|
55
|
-
client
|
|
56
|
+
client,
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -61,7 +62,7 @@ export async function estimateUserOperationGas<
|
|
|
61
62
|
return client.estimateUserOperationGas(
|
|
62
63
|
request,
|
|
63
64
|
account.getEntryPoint().address,
|
|
64
|
-
overrides?.stateOverride
|
|
65
|
+
overrides?.stateOverride,
|
|
65
66
|
);
|
|
66
67
|
});
|
|
67
68
|
}
|
|
@@ -11,10 +11,10 @@ export const getAddress: <
|
|
|
11
11
|
TChain extends Chain | undefined = Chain | undefined,
|
|
12
12
|
TAccount extends SmartContractAccount | undefined =
|
|
13
13
|
| SmartContractAccount
|
|
14
|
-
| undefined
|
|
14
|
+
| undefined,
|
|
15
15
|
>(
|
|
16
16
|
client: Client<TTransport, TChain, TAccount>,
|
|
17
|
-
args: GetAccountParameter<TAccount
|
|
17
|
+
args: GetAccountParameter<TAccount>,
|
|
18
18
|
) => Address = (client, args) => {
|
|
19
19
|
const { account } = args ?? { account: client.account };
|
|
20
20
|
if (!account) {
|
|
@@ -36,12 +36,13 @@ export async function _initUserOperation<
|
|
|
36
36
|
TContext extends UserOperationContext | undefined =
|
|
37
37
|
| UserOperationContext
|
|
38
38
|
| undefined,
|
|
39
|
-
TEntryPointVersion extends
|
|
39
|
+
TEntryPointVersion extends
|
|
40
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
40
41
|
>(
|
|
41
42
|
client: BaseSmartAccountClient<TTransport, TChain, TAccount>,
|
|
42
43
|
args:
|
|
43
44
|
| SendUserOperationParameters<TAccount, TContext, TEntryPointVersion>
|
|
44
|
-
| BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion
|
|
45
|
+
| BuildUserOperationParameters<TAccount, TContext, TEntryPointVersion>,
|
|
45
46
|
): Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>> {
|
|
46
47
|
const { account = client.account, uo, overrides } = args;
|
|
47
48
|
if (!account) {
|
|
@@ -57,8 +58,8 @@ export async function _initUserOperation<
|
|
|
57
58
|
const callData = Array.isArray(uo)
|
|
58
59
|
? account.encodeBatchExecute(uo)
|
|
59
60
|
: typeof uo === "string"
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
? uo
|
|
62
|
+
: account.encodeExecute(uo);
|
|
62
63
|
|
|
63
64
|
const signature = account.getDummySignature();
|
|
64
65
|
|
|
@@ -77,11 +78,11 @@ export async function _initUserOperation<
|
|
|
77
78
|
: ({
|
|
78
79
|
factory: conditionalReturn(
|
|
79
80
|
account.isAccountDeployed().then((deployed) => !deployed),
|
|
80
|
-
account.getFactoryAddress
|
|
81
|
+
account.getFactoryAddress,
|
|
81
82
|
),
|
|
82
83
|
factoryData: conditionalReturn(
|
|
83
84
|
account.isAccountDeployed().then((deployed) => !deployed),
|
|
84
|
-
account.getFactoryData
|
|
85
|
+
account.getFactoryData,
|
|
85
86
|
),
|
|
86
87
|
sender: account.address,
|
|
87
88
|
nonce,
|
|
@@ -38,14 +38,15 @@ export async function _runMiddlewareStack<
|
|
|
38
38
|
TContext extends UserOperationContext | undefined =
|
|
39
39
|
| UserOperationContext
|
|
40
40
|
| undefined,
|
|
41
|
-
TEntryPointVersion extends
|
|
41
|
+
TEntryPointVersion extends
|
|
42
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
42
43
|
>(
|
|
43
44
|
client: BaseSmartAccountClient<TTransport, TChain, TAccount>,
|
|
44
45
|
args: {
|
|
45
46
|
uo: Deferrable<UserOperationStruct<TEntryPointVersion>>;
|
|
46
47
|
context?: TContext;
|
|
47
48
|
} & GetAccountParameter<TAccount> &
|
|
48
|
-
UserOperationOverridesParameter<TEntryPointVersion
|
|
49
|
+
UserOperationOverridesParameter<TEntryPointVersion>,
|
|
49
50
|
): Promise<UserOperationStruct<TEntryPointVersion>> {
|
|
50
51
|
const { uo, overrides, account = client.account, context } = args;
|
|
51
52
|
if (!account) {
|
|
@@ -66,15 +67,15 @@ export async function _runMiddlewareStack<
|
|
|
66
67
|
...("paymasterAndData" in overrides!
|
|
67
68
|
? { paymasterAndData: overrides.paymasterAndData }
|
|
68
69
|
: "paymasterData" in overrides! &&
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
"paymaster" in overrides &&
|
|
71
|
+
overrides.paymasterData !== "0x"
|
|
72
|
+
? {
|
|
73
|
+
paymasterData: overrides.paymasterData,
|
|
74
|
+
paymaster: overrides.paymaster,
|
|
75
|
+
}
|
|
76
|
+
: // At this point, nothing has run so no fields are set
|
|
77
|
+
// for 0.7 when not using a paymaster, all fields should be undefined
|
|
78
|
+
undefined),
|
|
78
79
|
};
|
|
79
80
|
},
|
|
80
81
|
paymasterAndData: noopMiddleware,
|
|
@@ -90,7 +91,7 @@ export async function _runMiddlewareStack<
|
|
|
90
91
|
client.middleware.gasEstimator,
|
|
91
92
|
client.middleware.customMiddleware,
|
|
92
93
|
paymasterAndData,
|
|
93
|
-
client.middleware.userOperationSimulator
|
|
94
|
+
client.middleware.userOperationSimulator,
|
|
94
95
|
)(uo, { overrides, feeOptions: client.feeOptions, account, client, context });
|
|
95
96
|
|
|
96
97
|
return resolveProperties<
|
|
@@ -24,14 +24,15 @@ export async function _sendUserOperation<
|
|
|
24
24
|
TContext extends UserOperationContext | undefined =
|
|
25
25
|
| UserOperationContext
|
|
26
26
|
| undefined,
|
|
27
|
-
TEntryPointVersion extends
|
|
27
|
+
TEntryPointVersion extends
|
|
28
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
28
29
|
>(
|
|
29
30
|
client: BaseSmartAccountClient<TTransport, TChain, TAccount>,
|
|
30
31
|
args: {
|
|
31
32
|
uoStruct: UserOperationStruct<TEntryPointVersion>;
|
|
32
33
|
overrides?: UserOperationOverrides<TEntryPointVersion>;
|
|
33
34
|
} & GetAccountParameter<TAccount> &
|
|
34
|
-
GetContextParameter<TContext
|
|
35
|
+
GetContextParameter<TContext>,
|
|
35
36
|
): Promise<SendUserOperationResult<TEntryPointVersion>> {
|
|
36
37
|
const { account = client.account, uoStruct, context, overrides } = args;
|
|
37
38
|
if (!account) {
|
|
@@ -54,12 +54,13 @@ export async function sendTransaction<
|
|
|
54
54
|
TContext extends UserOperationContext | undefined =
|
|
55
55
|
| UserOperationContext
|
|
56
56
|
| undefined,
|
|
57
|
-
TEntryPointVersion extends
|
|
57
|
+
TEntryPointVersion extends
|
|
58
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
58
59
|
>(
|
|
59
60
|
client_: Client<Transport, TChain, TAccount>,
|
|
60
61
|
args: SendTransactionParameters<TChain, TAccount, TChainOverride>,
|
|
61
62
|
overrides?: UserOperationOverrides<TEntryPointVersion>,
|
|
62
|
-
context?: TContext
|
|
63
|
+
context?: TContext,
|
|
63
64
|
): Promise<Hex> {
|
|
64
65
|
const client = clientHeaderTrack(client_, "estimateUserOperationGas");
|
|
65
66
|
const { account = client.account } = args;
|
|
@@ -75,7 +76,7 @@ export async function sendTransaction<
|
|
|
75
76
|
throw new IncompatibleClientError(
|
|
76
77
|
"BaseSmartAccountClient",
|
|
77
78
|
"sendTransaction",
|
|
78
|
-
client
|
|
79
|
+
client,
|
|
79
80
|
);
|
|
80
81
|
}
|
|
81
82
|
|
|
@@ -83,7 +84,7 @@ export async function sendTransaction<
|
|
|
83
84
|
client,
|
|
84
85
|
args,
|
|
85
86
|
overrides,
|
|
86
|
-
context
|
|
87
|
+
context,
|
|
87
88
|
);
|
|
88
89
|
|
|
89
90
|
const { hash, request } = await _sendUserOperation(client, {
|
|
@@ -39,10 +39,10 @@ export async function sendTransactions<
|
|
|
39
39
|
TAccount extends SmartContractAccount | undefined =
|
|
40
40
|
| SmartContractAccount
|
|
41
41
|
| undefined,
|
|
42
|
-
TContext extends UserOperationContext | undefined = UserOperationContext
|
|
42
|
+
TContext extends UserOperationContext | undefined = UserOperationContext,
|
|
43
43
|
>(
|
|
44
44
|
client_: Client<TTransport, TChain, TAccount>,
|
|
45
|
-
args: SendTransactionsParameters<TAccount, TContext
|
|
45
|
+
args: SendTransactionsParameters<TAccount, TContext>,
|
|
46
46
|
): Promise<Hex> {
|
|
47
47
|
const client = clientHeaderTrack(client_, "estimateUserOperationGas");
|
|
48
48
|
const { requests, overrides, account = client.account, context } = args;
|
|
@@ -54,7 +54,7 @@ export async function sendTransactions<
|
|
|
54
54
|
throw new IncompatibleClientError(
|
|
55
55
|
"BaseSmartAccountClient",
|
|
56
56
|
"sendTransactions",
|
|
57
|
-
client
|
|
57
|
+
client,
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -45,10 +45,11 @@ export async function sendUserOperation<
|
|
|
45
45
|
TContext extends UserOperationContext | undefined =
|
|
46
46
|
| UserOperationContext
|
|
47
47
|
| undefined,
|
|
48
|
-
TEntryPointVersion extends
|
|
48
|
+
TEntryPointVersion extends
|
|
49
|
+
GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,
|
|
49
50
|
>(
|
|
50
51
|
client_: Client<TTransport, TChain, TAccount>,
|
|
51
|
-
args: SendUserOperationParameters<TAccount, TContext
|
|
52
|
+
args: SendUserOperationParameters<TAccount, TContext>,
|
|
52
53
|
): Promise<SendUserOperationResult<TEntryPointVersion>> {
|
|
53
54
|
const client = clientHeaderTrack(client_, "sendUserOperation");
|
|
54
55
|
const { account = client.account, context, overrides } = args;
|
|
@@ -61,7 +62,7 @@ export async function sendUserOperation<
|
|
|
61
62
|
throw new IncompatibleClientError(
|
|
62
63
|
"BaseSmartAccountClient",
|
|
63
64
|
"sendUserOperation",
|
|
64
|
-
client
|
|
65
|
+
client,
|
|
65
66
|
);
|
|
66
67
|
}
|
|
67
68
|
|