Skip to content

Conversation

@Bridgerz
Copy link
Contributor

Description

Describe the changes or additions included in this PR.

Test plan

How did you test the new or updated feature?


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):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • Indexing Framework:

@Bridgerz Bridgerz temporarily deployed to sui-typescript-aws-kms-test-env November 11, 2025 00:53 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Nov 11, 2025

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

Project Deployment Preview Comments Updated (UTC)
sui-docs Ready Ready Preview Comment Nov 12, 2025 10:59pm
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
multisig-toolkit Ignored Ignored Preview Nov 12, 2025 10:59pm
sui-kiosk Ignored Ignored Preview Nov 12, 2025 10:59pm

target_address: vector<u8>,
token_type: u8,
amount: u64,
timestamp: u64,
Copy link
Contributor

Choose a reason for hiding this comment

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

timestamp_ms


// check system ops seq number and increment it
let expected_seq_num = inner.get_current_seq_num_and_increment(message_type);
let expected_seq_num = inner.get_current_seq_num_and_increment(
Copy link
Contributor

Choose a reason for hiding this comment

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

whats with the inconsistent formatting or rather reformatting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this formatting is using "npx prettier-move -w **/*.move". I think Damir formatted this package a while back. let me touch base with him

Comment on lines 193 to 194
#[serde(default)]
pub block_timestamp: Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just add things here? i don't know enough about the serialization format for eth messages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no this is a mistake. We should not be updating the event emitted

Comment on lines 250 to +258
pub sui_bridge_event: EmittedSuiToEthTokenBridgeV1,
}

impl SuiToEthBridgeAction {
pub fn timestamp_seconds(&self) -> Option<u64> {
self.sui_bridge_event.timestamp_ms.map(|ms| ms / 1000)
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

So this may not work, and we'll likely want a full SuiToEthBridgeActionV2 type since the timestamp can't just be added as its a breaking change to the serialized format that we store in the db :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

Comment on lines 131 to 143
public fun extract_token_bridge_payload_v2_timestamp(message: &BridgeMessage): u64 {
let mut bcs = bcs::new(message.payload);
let _sender_address = bcs.peel_vec_u8();
let _target_chain = bcs.peel_u8();
let _target_address = bcs.peel_vec_u8();
let _token_type = bcs.peel_u8();
let _amount = peel_u64_be(&mut bcs);
let timestamp = peel_u64_be(&mut bcs);

assert!(bcs.into_remainder_bytes().is_empty(), ETrailingBytes);

timestamp
}
Copy link
Contributor

Choose a reason for hiding this comment

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

probably would be better to deser into the payload v2 struct itself and then have a function to get out the timestamp on it

Copy link
Contributor Author

@Bridgerz Bridgerz Nov 12, 2025

Choose a reason for hiding this comment

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

this was a result of trying to avoid introducing a "claim_token_v2" so that all messages regardless of version can be used in the same function.

chain_ids::assert_valid_chain_id(target_chain);
assert!(bcs.into_remainder_bytes().is_empty(), ETrailingBytes);

if (message.message_version() == 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably add a v2 payload type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will rework it

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.

3 participants