Skip to content

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Nov 11, 2024

PR-Codex overview

This PR enhances the functionality of smart backend wallets in the SDK by adding support for accountFactoryAddress and entrypointAddress, improving transaction handling, and introducing tests for wallet creation, token deployment, and minting.

Detailed summary

  • Updated chainId assignment in smart-local-wallet.test.ts.
  • Added accountFactoryAddress and entrypointAddress handling in insertTransaction.ts.
  • Enhanced getSmartWallet to include entrypointAddress.
  • Modified wallet retrieval in getWallet.ts to include accountFactoryAddress and entrypointAddress.
  • Introduced new tests for creating and managing a smart backend wallet in smart-local-wallet-sdk-v4.test.ts.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

d4mr added 5 commits November 11, 2024 12:48
This commit adds the missing entrypointAddress parameter to the getSmartWallet function in the getSmartWallet.ts file. The entrypointAddress is now passed as an argument to the SmartWallet constructor. This change ensures that the entrypointAddress is correctly set when using the v4 SDK with smart backend wallets.
This commit updates the getWallet function in the getWallet.ts file to set the accountFactoryAddress and entrypointAddress parameters when creating a smart wallet. The accountFactoryAddress and entrypointAddress are now retrieved from the walletDetails object and passed as arguments to the SmartWallet constructor. This change ensures that the accountFactoryAddress and entrypointAddress are correctly set when using the v4 SDK with smart backend wallets.
…tion

This commit updates the insertTransaction function in the insertTransaction.ts file to set the accountFactoryAddress and entrypointAddress parameters when creating a smart wallet. The accountFactoryAddress and entrypointAddress are now retrieved from the walletDetails object and assigned to the queuedTransaction object. This change ensures that the accountFactoryAddress and entrypointAddress are correctly set when using the v4 SDK with smart backend wallets.
This commit removes unused imports and updates the chainId variable in the smart-local-wallet.test.ts file. The chainId is now retrieved from the chain object. This change improves the readability and maintainability of the code.
This commit adds the smart-local-wallet-sdk-v4.test.ts file, which contains tests for creating a local smart backend wallet and sending SDK v4 transactions. The tests deploy an ERC20 token, mint tokens, and check the balance. This change improves the test coverage for the smart backend wallet functionality.
@d4mr d4mr merged commit 2f762dc into main Nov 11, 2024
5 checks passed
@d4mr d4mr deleted the pb/fix-sbw-sdk-v4 branch November 11, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants