Skip to content

Add wallet chain fallback#6

Merged
TuDo1403 merged 1 commit intomainfrom
tudo/fix-evm-wallet-chain
Apr 13, 2026
Merged

Add wallet chain fallback#6
TuDo1403 merged 1 commit intomainfrom
tudo/fix-evm-wallet-chain

Conversation

@TuDo1403
Copy link
Copy Markdown
Collaborator

@TuDo1403 TuDo1403 commented Apr 13, 2026

Summary

  • Add a fallback viem chain from the selected network for AccessManager EOA writes.
  • Reuse that fallback when the wallet client has no bound chain.
  • Return the direct fallback transaction hash immediately after submission instead of creating an HTTP receipt waiter without an RPC URL.
  • Cover the unbound wallet-client and direct fallback paths in tests.

Validation

  • pnpm --filter @openzeppelin/role-manager-app exec vitest run src/core/ecosystems/evm/tests/EvmAccessManagerService.test.ts
  • pnpm --filter @openzeppelin/role-manager-app exec vitest run src/core/ecosystems/evm/tests/safeSignAndBroadcast.test.ts src/core/ecosystems/evm/tests/EvmAccessManagerService.test.ts
  • pnpm --filter @openzeppelin/role-manager-app exec eslint src/core/ecosystems/evm/EvmAccessManagerService.ts src/core/ecosystems/evm/tests/EvmAccessManagerService.test.ts
  • pnpm --filter @openzeppelin/role-manager-app exec eslint src/core/ecosystems/evm/safeSignAndBroadcast.ts src/core/ecosystems/evm/tests/safeSignAndBroadcast.test.ts

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
role-manager Building Building Preview, Comment Apr 13, 2026 9:11am
role-manager-a74d Building Building Preview, Comment Apr 13, 2026 9:11am
role-manager-b9b9 Building Building Preview, Comment Apr 13, 2026 9:11am
role-manager-rotd Building Building Preview, Comment Apr 13, 2026 9:11am

@TuDo1403 TuDo1403 merged commit e8a5f4e into main Apr 13, 2026
2 of 9 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the EvmAccessManagerService by introducing a private getFallbackChain method to centralize the creation of fallback chain configurations. This change eliminates redundant dynamic imports of defineChain and ensures that sendTransaction correctly utilizes the fallback chain when the wallet client's chain is not provided. A corresponding test case was also added to verify that transactions are initiated with the expected chain ID. I have no feedback to provide.

@vercel vercel Bot temporarily deployed to Preview – role-manager-a74d April 13, 2026 09:17 Inactive
@vercel vercel Bot temporarily deployed to Preview – role-manager-b9b9 April 13, 2026 09:20 Inactive
@vercel vercel Bot temporarily deployed to Preview – role-manager-rotd April 13, 2026 09:21 Inactive
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.

1 participant