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

[bridge] add get token payload for dev inspect #17563

Closed

Conversation

longbowlu
Copy link
Contributor

Description

  1. add move struct ParsedTokenTransferMessage and function get_parsed_token_transfer_message to get parsed token transfer data given chain id and seq num
  2. make function get_token_transfer_action_status private
  3. rename TokenPayload to TokenTransferPayload
  4. refactor get_token_transfer_xyz and extract common logic to dev_inspect_bridge

Test plan

existing tests and new tests added in this PR


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) May 8, 2024 3:54am
sui-kiosk ⬜️ Ignored (Inspect) May 8, 2024 3:54am
sui-typescript-docs ⬜️ Ignored (Inspect) May 8, 2024 3:54am

Copy link
Contributor

@dariorussi dariorussi left a comment

Choose a reason for hiding this comment

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

you may have some merging issue here, we'll see...

source_chain_id: u8,
seq_number: u64,
) -> BridgeResult<Option<ParsedTokenTransferMessage>> {
let now = std::time::Instant::now();
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this used for?

@@ -657,6 +689,15 @@ module bridge::bridge {
bridge.load_inner()
}

#[test_only]
public fun test_get_token_transfer_action_status(
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not think we need the public on test only function but fine either way

}

// Convert BridgeMessage to ParsedTokenTransferMessage
public fun to_parsed_token_transfer_message(message: &BridgeMessage): ParsedTokenTransferMessage {
Copy link
Contributor

@dariorussi dariorussi May 8, 2024

Choose a reason for hiding this comment

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

public? it may very well be fine and harmless no matter what but figured I'd ask

@longbowlu
Copy link
Contributor Author

#17729

@longbowlu longbowlu closed this May 14, 2024
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.

None yet

2 participants