Skip to content

Conversation

@shankars99
Copy link
Collaborator

Instead of returning addresses based on eid parse them based on their encoding by padding to bytes32 or from base58 for Solana.

Signed-off-by: shankar [email protected]

@tinom9 tinom9 requested a review from Copilot October 27, 2025 18:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors address format handling to support multiple blockchain encodings (EVM hex, Solana base58, TON base64) through auto-detection rather than endpoint ID-based chain type checking. The key improvement is a unified basexToBytes32() function that automatically detects and converts any supported address format to a consistent bytes32 representation.

Key Changes:

  • Replaced chain-type-based address conversion with automatic format detection
  • Unified all address comparison and conversion operations to use basexToBytes32()
  • Removed now-redundant helper functions (formatAddress, evmAddressToAptos, decodeSolanaAddress)

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/devtools-move/tasks/shared/basexToBytes32.ts Complete refactor with auto-detection logic for base58, base64, and hex formats; removed endpoint ID parameter
packages/devtools-move/tasks/move/utils/moveVMOftConfigOps.ts Replaced formatAddress and evmAddressToAptos with basexToBytes32 throughout; removed obsolete helper functions
packages/devtools-move/tasks/evm/wire-evm.ts Updated basexToBytes32 call to remove endpoint ID parameter
packages/devtools-move/jest/baseXtoBytes32.test.ts Rewrote tests to validate auto-detection behavior instead of chain-type-specific conversions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: shankar <[email protected]>
@shankars99 shankars99 self-assigned this Oct 27, 2025
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