Skip to content

Add TxHash to Message #1073

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add TxHash to Message #1073

wants to merge 1 commit into from

Conversation

rstout
Copy link
Contributor

@rstout rstout commented Jul 8, 2025

TxHash was recently added to the Sequence type in contract_reader. In this commit we bump the version of chainlink-common to access this new field and use it to populate the TxHash field of Message. The forthcoming CCTPv2 attestation logic needs TxHash to fetch attestations for a Message's USDC transfers.

@rstout rstout force-pushed the expose_msg_tx_hash branch from cd5d7fc to 67eda25 Compare July 8, 2025 16:46
TxHash was recently added to the Sequence type in contract_reader. In this
commit we bump the version of chainlink-common to access this new field and
use it to populate the TxHash field of Message. The forthcoming CCTPv2
attestation logic needs TxHash to fetch attestations for a Message's USDC
transfers.
@rstout rstout force-pushed the expose_msg_tx_hash branch from 67eda25 to d425345 Compare July 8, 2025 17:14
@rstout rstout marked this pull request as ready for review July 8, 2025 17:28
@rstout rstout requested a review from a team as a code owner July 8, 2025 17:28
@@ -172,6 +174,7 @@ func (l *DefaultAccessor) MsgsBetweenSeqNums(
}

msg.Message.Header.OnRamp = onRampAddress
msg.Message.Header.TxHash = "0x" + hex.EncodeToString(item.TxHash)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose this pattern is already implemented as Bytes.String() function. It might be worth replacing it with NewBytesFromString(item.TxHash).String() or something similar

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have a tiny unit test to cover that change?

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