From efceadd3c152dc43f00454f3dc90540f8b38e2de Mon Sep 17 00:00:00 2001 From: joaquim-verges Date: Fri, 7 Mar 2025 20:37:57 +0000 Subject: [PATCH] [SDK] test: Update smart wallet tests to use Arbitrum Sepolia (#6436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR updates the test file `smart-wallet-integration-v07.test.ts` to switch the blockchain network from `sepolia` to `arbitrumSepolia`, modifies the contract address, and adds a new expectation for contract deployment verification. ### Detailed summary - Added import for `arbitrumSepolia`. - Changed the blockchain network from `sepolia` to `arbitrumSepolia`. - Updated the contract address from `0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8` to `0x6A7a26c9a595E6893C255C9dF0b593e77518e0c3`. - Added expectation to verify if the contract is deployed. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../smart/smart-wallet-integration-v07.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts b/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts index f5539ce0107..b9be41570b4 100644 --- a/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts +++ b/packages/thirdweb/src/wallets/smart/smart-wallet-integration-v07.test.ts @@ -8,8 +8,8 @@ import { parseEventLogs } from "../../event/actions/parse-logs.js"; import { TEST_WALLET_A } from "~test/addresses.js"; import { verifyEip1271Signature } from "../../auth/verify-hash.js"; import { verifyTypedData } from "../../auth/verify-typed-data.js"; +import { arbitrumSepolia } from "../../chains/chain-definitions/arbitrum-sepolia.js"; import { baseSepolia } from "../../chains/chain-definitions/base-sepolia.js"; -import { sepolia } from "../../chains/chain-definitions/sepolia.js"; import { addAdmin, adminUpdatedEvent, @@ -41,12 +41,12 @@ let smartWalletAddress: string; let personalAccount: Account; let accountContract: ThirdwebContract; -const chain = sepolia; +const chain = arbitrumSepolia; const client = TEST_CLIENT; const contract = getContract({ client, chain, - address: "0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8", + address: "0x6A7a26c9a595E6893C255C9dF0b593e77518e0c3", }); describe.runIf(process.env.TW_SECRET_KEY).sequential( @@ -132,6 +132,8 @@ describe.runIf(process.env.TW_SECRET_KEY).sequential( }); await new Promise((resolve) => setTimeout(resolve, 3000)); // pause for a second to prevent race condition + expect(await isContractDeployed(accountContract)).toEqual(true); + const signature = await smartAccount.signMessage({ message: "hello world", }); @@ -201,10 +203,10 @@ describe.runIf(process.env.TW_SECRET_KEY).sequential( }); await expect(tx).rejects.toMatchInlineSnapshot(` - [TransactionError: Execution Reverted: {"code":3,"message":"execution reverted: Not authorized"} + [TransactionError: Error - Not authorized contract: ${contract.address} - chainId: 11155111] + chainId: 421614] `); });