diff --git a/generated.ts b/generated.ts index 9e8d696..46a367e 100644 --- a/generated.ts +++ b/generated.ts @@ -481,7 +481,7 @@ export const accountAbi = [ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** - * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x5716673E64B74E7D16FAd20c53B1687983b2E350) + * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x775062650652749c86686f68971F23Bb3FFf2b92) */ export const accountFactoryAbi = [ { @@ -535,14 +535,14 @@ export const accountFactoryAbi = [ ] as const /** - * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x5716673E64B74E7D16FAd20c53B1687983b2E350) + * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x775062650652749c86686f68971F23Bb3FFf2b92) */ export const accountFactoryAddress = { - 84532: '0x5716673E64B74E7D16FAd20c53B1687983b2E350', + 84532: '0x775062650652749c86686f68971F23Bb3FFf2b92', } as const /** - * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x5716673E64B74E7D16FAd20c53B1687983b2E350) + * [__View Contract on Base Sepolia Blockscout__](https://base-sepolia.blockscout.com/address/0x775062650652749c86686f68971F23Bb3FFf2b92) */ export const accountFactoryConfig = { address: accountFactoryAddress, diff --git a/src/config.ts b/src/config.ts index 259fa10..66e7021 100644 --- a/src/config.ts +++ b/src/config.ts @@ -72,11 +72,11 @@ type BuildNextConfigArgs = { export async function buildNextConfig(client: PublicClient, { account, currentConfigData, newConfigData }: BuildNextConfigArgs): Promise { const { configHash, configNonce } = await getMasterKeystoreStorage(client, account); - console.log("configHash", configHash); - console.log("configNonce", configNonce); - const expectedConfigHash = hashConfig({ account, nonce: configNonce, data: currentConfigData }); - if (configHash !== expectedConfigHash) { - throw new Error(`Config hash mismatch: actual ${configHash} !== expected ${expectedConfigHash}`); + if (fromHex(configHash, "bigint") !== 0n) { + const expectedConfigHash = hashConfig({ account, nonce: configNonce, data: currentConfigData }); + if (configHash !== expectedConfigHash) { + throw new Error(`Config hash mismatch: actual ${configHash} !== expected ${expectedConfigHash}`); + } } return { diff --git a/wagmi.config.ts b/wagmi.config.ts index a3a6ce5..37f18db 100644 --- a/wagmi.config.ts +++ b/wagmi.config.ts @@ -12,7 +12,7 @@ export default defineConfig({ { abi: smartWalletFactoryABI, address: { - [baseSepolia.id]: "0x5716673E64B74E7D16FAd20c53B1687983b2E350", + [baseSepolia.id]: "0x775062650652749c86686f68971F23Bb3FFf2b92", // [optimismSepolia.id]: "0x4Ca895d26b7eb26a9D980565732049d4199f32C8", }, name: "AccountFactory",