Skip to content

Conversation

@LeilaWang
Copy link
Contributor

Fix the add_rollup e2e test by funding the new rollup's fee juice portal.

Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

Looks good! Just a note on awaiting txs and a possible refactor. Feel free to ignore if you think it's not worth it!

`Minting ${mintsNeeded} times (${mintAmount} per mint) to fund new FeeJuicePortal at ${newFeeJuicePortalAddress}`,
);
for (let i = 0; i < mintsNeeded; i++) {
await feeAssetHandler.write.mint([newFeeJuicePortalAddress.toString() as Hex]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Heads up this won't wait for the tx to be mined. It should be ok since the deployL1Contract call below will wait until its own tx is mined, which means all older txs will also be awaited to be mined.

Alternatively, you can clean up much of the code here by using ethereum/src/contracts/fee_asset_handler.ts which abstracts a few things. I don't think it handles this loop, but we could just add it there and hide this complexity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the great suggestions! I've changed it to use the contract helper (also updated it so the apis are consistent with other contracts). And realized I could call setMintAmount so the code is cleaner now!

Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the changes. Out of curiosity, what changed recently that caused this to break?

@LeilaWang
Copy link
Contributor Author

We changed the out hash to be inserted when an epoch is proven. So for this test, I had to create the prover in order to submit the epoch proof and update the out hash. And the code path for rewards is triggered, so now we need to fund it 🥲

Previously, the out hash was inserted when a checkpoint is proposed. And we used the cheatcode to simply update the proven checkpoint number for it to be able to be consumed.

@LeilaWang LeilaWang added this pull request to the merge queue Jan 8, 2026
Merged via the queue into next with commit cee3560 Jan 8, 2026
16 checks passed
@LeilaWang LeilaWang deleted the lw/fix_add_rollup branch January 8, 2026 20:11
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.

3 participants