diff --git a/.changeset/modern-pumas-marry.md b/.changeset/modern-pumas-marry.md new file mode 100644 index 0000000..6186cda --- /dev/null +++ b/.changeset/modern-pumas-marry.md @@ -0,0 +1,5 @@ +--- +"@soulwallet/sdk": patch +--- + +Fixed some bugs diff --git a/packages/soulwallet-sdk/src/bundler.ts b/packages/soulwallet-sdk/src/bundler.ts index c42cac9..4b3ba47 100644 --- a/packages/soulwallet-sdk/src/bundler.ts +++ b/packages/soulwallet-sdk/src/bundler.ts @@ -43,7 +43,7 @@ export class Bundler implements IBundler { } } - async eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: StateOverride): Promise> { + async eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: Record): Promise> { try { const params = [ JSON.parse(userOperationToJSON(userOp)), diff --git a/packages/soulwallet-sdk/src/interface/IBundler.ts b/packages/soulwallet-sdk/src/interface/IBundler.ts index 1767a33..db8cf56 100644 --- a/packages/soulwallet-sdk/src/interface/IBundler.ts +++ b/packages/soulwallet-sdk/src/interface/IBundler.ts @@ -123,7 +123,7 @@ export abstract class IBundler { * @return {*} {Promise>} * @memberof IBundler */ - abstract eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: StateOverride): Promise>; + abstract eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: Record): Promise>; /** * diff --git a/packages/soulwallet-sdk/src/interface/ISoulWallet.ts b/packages/soulwallet-sdk/src/interface/ISoulWallet.ts index 3c07d27..3f37f26 100644 --- a/packages/soulwallet-sdk/src/interface/ISoulWallet.ts +++ b/packages/soulwallet-sdk/src/interface/ISoulWallet.ts @@ -114,13 +114,13 @@ export abstract class ISoulWallet { * @abstract * @param {string} validatorAddress validator contract address * @param {UserOperation} userOp UserOperation - * @param {StateOverride} [stateOverride] + * @param {Record} [stateOverride] stateOverride * @param {SignkeyType} [signkeyType] default: SignkeyType.EOA * @param {GuardHookInputData} [semiValidGuardHookInputData] sender: wallet address, inputData: key: guardHookPlugin address, value: input data * @return {*} {Promise>} * @memberof ISoulWallet */ - abstract estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: StateOverride, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise>; + abstract estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: Record, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise>; /** * broadcast the userOp. diff --git a/packages/soulwallet-sdk/src/soulWallet.ts b/packages/soulwallet-sdk/src/soulWallet.ts index ee26a7e..8264bd7 100644 --- a/packages/soulwallet-sdk/src/soulWallet.ts +++ b/packages/soulwallet-sdk/src/soulWallet.ts @@ -618,7 +618,7 @@ export class SoulWallet implements ISoulWallet { return new Ok(signatureRet.OK); } - async estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: StateOverride, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise> { + async estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: Record, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise> { const semiValidSignature = userOp.signature === "0x"; const _onChainConfig = await this.getOnChainConfig(); if (_onChainConfig.isErr() === true) {