-
Notifications
You must be signed in to change notification settings - Fork 67
Update Solana off-chain codec #1539
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
huangzhen1997
wants to merge
6
commits into
develop
Choose a base branch
from
jh/update-solana-off-chain-codec
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
de82a4d
update the previous extra datacodec patch from core
huangzhen1997 b11ba37
export function and types
huangzhen1997 02e061c
export ExtractDestGasAmountFromMap
huangzhen1997 2cd8e8b
export fields
huangzhen1997 9ff7c7d
fix upper case
huangzhen1997 4345838
Merge branch 'develop' into jh/update-solana-off-chain-codec
huangzhen1997 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg ccipocr3.Message) (ccipocr | |
| return [32]byte{}, fmt.Errorf("failed to decode dest exec data: %w", err) | ||
| } | ||
|
|
||
| destGasAmount, err := extractDestGasAmountFromMap(destExecDataDecodedMap) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there no more changes to backport into this file? The msghasher in core looks completely different |
||
| destGasAmount, err := ExtractDestGasAmountFromMap(destExecDataDecodedMap) | ||
| if err != nil { | ||
| return [32]byte{}, err | ||
| } | ||
|
|
@@ -76,15 +76,15 @@ func (h *MessageHasherV1) Hash(_ context.Context, msg ccipocr3.Message) (ccipocr | |
| return [32]byte{}, fmt.Errorf("failed to decode extra args: %w", err) | ||
| } | ||
|
|
||
| ed, err := parseExtraDataMap(extraDataDecodedMap) | ||
| ed, err := ParseExtraDataMap(extraDataDecodedMap) | ||
| if err != nil { | ||
| return [32]byte{}, fmt.Errorf("failed to decode ExtraArgs: %w", err) | ||
| } | ||
|
|
||
| anyToSolanaMessage.TokenReceiver = ed.tokenReceiver | ||
| anyToSolanaMessage.ExtraArgs = ed.extraArgs | ||
| accounts := ed.accounts | ||
| // if logical receiver is empty, don't prepend it to the accounts list | ||
| anyToSolanaMessage.TokenReceiver = ed.TokenReceiver | ||
| anyToSolanaMessage.ExtraArgs = ed.ExtraArgs | ||
| accounts := ed.Accounts | ||
| // if logical receiver is empty, don't prepend it to the Accounts list | ||
| if !msg.Receiver.IsZeroOrEmpty() { | ||
| accounts = append([]solana.PublicKey{solana.PublicKeyFromBytes(msg.Receiver)}, accounts...) | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change comes from a previous fix from core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see it's moved here