-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: added OWR pectra v0.1 #145
base: main
Are you sure you want to change the base?
Conversation
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.
Want to have a think about the contract name, and the name of the two system contracts. Concern about a uint8 knocking around. Think we potentially may need to get smart around the value handling aspect, to ensure we have enough msg.value
to pay the basefee, but also don't overpay or get the eth stuck.
Let me know if the feedback is unclear :)
// ;; +--------+--------+ | ||
// ;; 48 48 | ||
|
||
(bool ret,) = pectraConsolidationAddress.call{value: msg.value}(abi.encodePacked(source, target)); |
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.
(bool ret,) = pectraConsolidationAddress.call{value: msg.value}(abi.encodePacked(source, target)); | |
(bool ret,) = pectraConsolidationAddress.call{value: msg.value}(abi.encodePacked(source, target)); |
Its interesting that the fee will have to be passed as a value to the call, not as like gas costs. This might make it difficult to predict. Does the method return value if we overpay? it doesn't look like it to me. https://github.com/lightclient/sys-asm/blob/main/src/consolidations/main.eas#L51
So maybe we should do a read request of the fee (i think that's possible looking at the assembly), then send only that as msg.value? and then return the remainder to the caller?
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 wasn't tackled yet. I will check this out
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.
Added an option for this. We don't have a clear example for how the fee will be computed in production but I followed the eas
files of main and fake_expo to understand what they are doing. Did a similar behavior on our side in the last commit
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.
I'm not 100% sure about it yet. Also they don't mention about it, other than using the fake_expo.eas
contract. Which I assume it's similar to a production ready fee computation contract. In case it follows the same interface, our part should work as well
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.
cc @OisinKyne
Maybe @samparsky can you take a look at the last commit as well, please?
No description provided.