From 29306f195415ee0c6d4e02bbce0ac0e086f1d978 Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Thu, 14 Nov 2024 14:57:19 +0700 Subject: [PATCH 1/2] Add thirdweb version --- .../accounts/thirdweb/toThirdwebSmartAccount.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/permissionless/accounts/thirdweb/toThirdwebSmartAccount.ts b/packages/permissionless/accounts/thirdweb/toThirdwebSmartAccount.ts index 5059eae2..2510f2c2 100644 --- a/packages/permissionless/accounts/thirdweb/toThirdwebSmartAccount.ts +++ b/packages/permissionless/accounts/thirdweb/toThirdwebSmartAccount.ts @@ -36,10 +36,16 @@ import { signTypedData } from "./utils/signTypedData.js" */ export const THIRDWEB_ADDRESSES = { "0.6": { - factoryAddress: "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00" as Address + "1.5.20": { + factoryAddress: + "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00" as Address + } }, "0.7": { - factoryAddress: "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb" as Address + "1.5.20": { + factoryAddress: + "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb" as Address + } } } @@ -57,6 +63,7 @@ export type ToThirdwebSmartAccountParameters< address: Address version: entryPointVersion } + version?: "1.5.20" salt?: string address?: Address secp256k1VerificationFacetAddress?: Address @@ -102,8 +109,11 @@ export async function toThirdwebSmartAccount< owner, client, salt, + version, address, - factoryAddress = THIRDWEB_ADDRESSES[entryPoint.version].factoryAddress + factoryAddress = THIRDWEB_ADDRESSES[entryPoint.version][ + version ?? "1.5.20" + ].factoryAddress } = parameters const admin = await toOwner({ owner }) From b23471a3daa08cda57d09366c01356f38564fd7a Mon Sep 17 00:00:00 2001 From: Garvit Khatri Date: Thu, 14 Nov 2024 15:00:38 +0700 Subject: [PATCH 2/2] Add changeset --- .changeset/tasty-cheetahs-jump.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tasty-cheetahs-jump.md diff --git a/.changeset/tasty-cheetahs-jump.md b/.changeset/tasty-cheetahs-jump.md new file mode 100644 index 00000000..ab7b60d1 --- /dev/null +++ b/.changeset/tasty-cheetahs-jump.md @@ -0,0 +1,5 @@ +--- +"permissionless": patch +--- + +Added thirdweb factory version