-
Notifications
You must be signed in to change notification settings - Fork 310
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
L1<>L2 basic contracts - Inbox, outbox, message bridge #540
Conversation
9b5fc05
to
e11e2a3
Compare
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 a few comments
88687a4
to
293acc3
Compare
function batchConsume(bytes32[] memory entryKeys, address _feeCollector) external onlyRollup { | ||
uint256 totalFee = 0; | ||
for (uint256 i = 0; i < entryKeys.length; i++) { | ||
// TODO: Combine these to optimise for gas. |
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.
Is this todo still active? Or is this referring to the storage packing?
When passing in structs to functions e.g., |
For the registry. Also useful to support fetching just one of the values. For portals doing an exit they don't need to know of the inbox so it wastes gas to fetch it if only supporting Similar for the message box, your |
I've implemented this with interfaces for moving the structs about on my branch if you wanna yoink it @rahul-kothari md/scaffold-l1-l2-e2e |
* fix: data structure library * fix: forge fmt
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 think its fine to get in, then the last comments here which is more nits can be fixed in a separate pr such that we can move along.
bytes32 _secretHash | ||
) external payable returns (bytes32) { | ||
if (_deadline <= block.timestamp) revert Inbox__DeadlineBeforeNow(); | ||
uint64 fee = uint64(msg.value); |
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 cast is unsafe, if paying more than 2**64
wei, some will simply be lost. If this is desired approach, add a note why.
Description
Closes #517
Closes #516
TODO: Add tests
Checklist: