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

Public HashLeaf Function #739

Merged
merged 9 commits into from
May 23, 2024
Merged

Public HashLeaf Function #739

merged 9 commits into from
May 23, 2024

Conversation

winder
Copy link
Contributor

@winder winder commented Apr 19, 2024

Motivation

Reusing the HashLeaf function in a separate repository.

It also allows re-using the HashLeaf function in the manual-execution app.

Solution

A factory function to provide access to the internal HashLeaf functions.

Copy link
Collaborator

@matYang matYang left a comment

Choose a reason for hiding this comment

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

this feels like an easy place to miss when future version are added, is it possible to move this into factory/onramp, or at least add a comment there to also update the code here

// MakeLeafHasher is a factory function to construct the onramp implementing the HashLeaf function for a given version.
func MakeLeafHasher(ver Version, cl bind.ContractBackend, sourceChainSelector uint64, destChainSelector uint64, onRampId common.Address, ctx hashlib.Ctx[[32]byte]) (LeafHasher, error) {
switch ver {
case V1_0_0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

can remove v1.0, it's been killed

@winder winder merged commit a4b6424 into ccip-develop May 23, 2024
81 checks passed
@winder winder deleted the will-leafer branch May 23, 2024 18:49
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