Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Refactor chain address validation - #1105

Merged
0xh3rman merged 1 commit into
mainfrom
h/address-refactoring
May 4, 2026
Merged

0xh3rman merged 1 commit into
mainfrom
h/address-refactoring

Conversation

@0xh3rman

@0xh3rman 0xh3rman commented May 1, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

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

Copy link
Copy Markdown
Contributor

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 standardizes address validation and representation across multiple blockchain crates by implementing a common AddressTrait and providing validate_address functions. It also introduces GemChainAddress in the gemstone crate for cross-platform compatibility via UniFFI and updates crate dependencies to support these changes. Feedback identifies a bug in the NearAddress implementation where as_bytes incorrectly returns hex string bytes instead of decoded address bytes, and suggests that TronAddress::as_bytes should return only the 20-byte payload for consistency.

Comment thread crates/gem_near/src/address.rs Resolved
Comment thread crates/gem_tron/src/address/mod.rs Resolved
Comment thread crates/primitives/src/chain_address.rs Resolved
@0xh3rman
0xh3rman force-pushed the h/address-refactoring branch from d3a6f24 to b7fd282 Compare May 4, 2026 13:37
@0xh3rman
0xh3rman merged commit 5c8f724 into main May 4, 2026
6 checks passed
@0xh3rman
0xh3rman deleted the h/address-refactoring branch May 4, 2026 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants