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

add quote view fn & replace getCompactWitnessTypestring w/ getCompactWitnessDetails #3

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

0age
Copy link
Collaborator

@0age 0age commented Nov 26, 2024

No description provided.

@0age 0age requested a review from yorhodes November 26, 2024 07:56
Copy link
Collaborator

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

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

nice job intuiting this

return _Router_quoteDispatch(
claimChain,
Message.encode(compact, allocatorSignature, sponsorSignature, hash(intent), intent.fee, filler),
"",
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we dont populate anything here, the handle function is assumed to have a gas limit of 50k
we may need to adjust this, have you successfully used these quotes in prod yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not yet — open question on whether to just build in an approximate buffer and let filler work out the exact quoted fee or if the UI should derive it locally

Comment on lines +174 to +179
compactTokenArguments = new string[](1);
compactTokenArguments[0] = "fee";

// Arguments that refer to some amount of an arbitrary chain + token combination
customTokenArguments = new string[3][](1);
customTokenArguments[0] = ["intent.chainId", "intent.token", "intent.amount"];
Copy link
Collaborator

Choose a reason for hiding this comment

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

would be very happy to just adopt whatever standard struct you propose on the compact
this would facilitate both users and fillers to understand the eip712 payloads better

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do feel like some form of JSON payload that lays out the typestring as well as the various semantic context and relations between the arguments could be a better way than .. whatever this is 🤣

that said, it does get the job done for just detecting token names / decimals to use 🤷

@0age 0age merged commit b99bc95 into main Nov 26, 2024
4 checks passed
@0age 0age deleted the hyperlane-tweaks branch November 26, 2024 19:20
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