Skip to content

Commit

Permalink
added argument type for module address
Browse files Browse the repository at this point in the history
  • Loading branch information
GabiDev45 committed May 13, 2024
1 parent 3414af4 commit fe87d00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/account/BiconomySmartAccountV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import type {
SimulationType,
SupportedToken,
Transaction,
TransferOwnershipCompatibleModule,
WithdrawalRequest
} from "./utils/Types.js"
import {
Expand Down Expand Up @@ -1371,7 +1372,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {
/**
* Transfers ownership of the smart account to a new owner.
* @param newOwner The address of the new owner.
* @param moduleAddress The address of the validation module (ECDSA Ownership Module or Multichain Validation Module).
* @param moduleAddress {@link TransferOwnershipCompatibleModule} The address of the validation module (ECDSA Ownership Module or Multichain Validation Module).
* @param buildUseropDto {@link BuildUserOpOptions}. Optional parameter
* @returns A Promise that resolves to a UserOpResponse or rejects with an Error.
* @description This function will transfer ownership of the smart account to a new owner. If you use session key manager module, after transferring the ownership
Expand Down Expand Up @@ -1410,7 +1411,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {
*/
async transferOwnership(
newOwner: Address,
moduleAddress: Address,
moduleAddress: TransferOwnershipCompatibleModule,
buildUseropDto?: BuildUserOpOptions
): Promise<UserOpResponse> {
const encodedCall = encodeFunctionData({
Expand Down
4 changes: 4 additions & 0 deletions src/account/utils/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,3 +609,7 @@ export interface ISmartContractAccount<
upgradeToInitData: Hex
) => Promise<Hex>
}

export type TransferOwnershipCompatibleModule =
| "0x0000001c5b32F37F5beA87BDD5374eB2aC54eA8e"
| "0x000000824dc138db84FD9109fc154bdad332Aa8E"

0 comments on commit fe87d00

Please sign in to comment.