Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(interchain-token-service): encode source/recipient addresses as strings instead of XDR #147

Merged
merged 14 commits into from
Jan 20, 2025

Conversation

TanvirDeol
Copy link
Contributor

@TanvirDeol TanvirDeol commented Jan 16, 2025

@TanvirDeol TanvirDeol requested a review from a team as a code owner January 16, 2025 22:16
@TanvirDeol
Copy link
Contributor Author

As of now, I have left the sender addresses in tests interchain_transfer_message_execute_succeeds and interchain_transfer_execute_succeeds as XDR format. This is because they get compared to previously recorded golden snapshots using the goldie crate.

Here is what I mean: goldie::assert!(events::fmt_last_emitted_event::<test::ExecutedEvent>(&env));

Changing these sender addresses to String format changes the bytes data representation which makes the assert fail.
Bytes when sender is String format: Bytes(0, 0, 0, 18, 0, 0, 0, ...),
Bytes when sender is XDR format: Bytes(67, 65, 65, 65, 65, ...),

So my question is: Should I change this golden snapshot data to fit the String format, or leave it as is?

contracts/interchain-token-service/src/contract.rs Outdated Show resolved Hide resolved
packages/axelar-std/src/address.rs Outdated Show resolved Hide resolved
packages/axelar-std/src/address.rs Outdated Show resolved Hide resolved
packages/axelar-std/src/address.rs Show resolved Hide resolved
packages/axelar-std/src/address.rs Outdated Show resolved Hide resolved
contracts/interchain-token-service/src/contract.rs Outdated Show resolved Hide resolved
@milapsheth milapsheth changed the title feat(interchain-token-service): use string addresses instead of XDR feat(interchain-token-service): encode source/recipient addresses as strings instead of XDR Jan 19, 2025
packages/axelar-std/src/address.rs Outdated Show resolved Hide resolved
packages/axelar-std/src/address.rs Outdated Show resolved Hide resolved
packages/axelar-std/src/address.rs Show resolved Hide resolved
@milapsheth milapsheth enabled auto-merge (squash) January 19, 2025 23:59
@milapsheth milapsheth merged commit 2b3ca63 into main Jan 20, 2025
5 checks passed
@milapsheth milapsheth deleted the fix/string-addresses branch January 20, 2025 00:01
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