-
Notifications
You must be signed in to change notification settings - Fork 101
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
Support for rollup mode when using fee token #252
Draft
gvladika
wants to merge
48
commits into
develop
Choose a base branch
from
custom-fee-rollup
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
36e3996
Start of custom fee tokens for rollups
yahgwai 84ef567
Do not exclude batch reports when using fee token
gvladika 8125656
Add condition for submitting the batch report, and do the scaling
gvladika 74f9939
Add IFeeTokenPricer
gvladika 504dbc0
Add getter and setter for pricer to the interface
gvladika 44f3986
Add setter for feeTokenPricer
gvladika ef4f1fb
Add missing param
gvladika a6a3f55
Use new SeqInbox init param
gvladika f3eb844
Make existing tests work with feeTokenPricer
gvladika 2897ce6
Format
gvladika 70f6ad4
Add setFeeTokenPricer tests
gvladika 213039f
Fee token pricing deployment
yahgwai 4c643e1
Merge branch 'custom-fee-rollup' of https://github.com/OffchainLabs/n…
yahgwai 57f46ed
Revert if trying to set fee token pricer when fee token is not used
gvladika 33420d4
Add fuzz test for different exchange rates
gvladika 8a1dfdd
Handle overflow case due to too high exchange rate
gvladika 252f599
Updated erc20rollupeventinbox to do gas price scaling
yahgwai e852b6a
Merge branch 'custom-fee-rollup' of https://github.com/OffchainLabs/n…
yahgwai a702a08
Added integration test for batch poster reimbursement
yahgwai 86c5a94
Update rollupInitialized test
gvladika 1bcf1aa
Refactor tests and check initial cost is properly reported
gvladika e752cb7
Merge branch 'custom-fee-rollup' of https://github.com/OffchainLabs/n…
yahgwai 14297dc
Added fee token pricer arg
yahgwai e3217ed
Use token fee pricer testnode ref
yahgwai cf42d00
Updated int fee token tests
yahgwai f64df33
Formatting
yahgwai 70c19e8
Updated comments
yahgwai e3a7f9b
Formatting
yahgwai fcb4950
Try tests with init
yahgwai 483171b
Added separate job for e2e tests
yahgwai 913bf45
Missed test name change
yahgwai 2956969
Disable while true condition linting
yahgwai 1f33876
Fixed 4844 tests
yahgwai f22ec8c
Added fee token pricer address zero to arb rollup spec
yahgwai 2b57aac
Formatting
yahgwai e6b0beb
Updated orbit ame
yahgwai 2f876cf
Updated sigs and storage
yahgwai fde0833
Added estimate gas
yahgwai 14a10ef
L1 wal balance console
yahgwai 20ebdbe
Console logging
yahgwai 782c792
Added gas price estimation
yahgwai 9f17bcb
Update Slither db, no new findings
gvladika 7f4161f
Add fuzz test for rollupInitialized
gvladika 96d2592
Merge branch 'develop' into custom-fee-rollup
gzeoneth bf402da
Merge branch 'develop' into custom-fee-rollup
gvladika e071dde
Clean up
gvladika f050fdb
Update slither db
gvladika c015aaf
Update audit-ci.jsonc
gvladika File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
instead of a getter that return spot rate, I think it make more sense to have a mutable method
spendingInEth(uint256 wei, address spender)
that take the number of eth spent as input and return the number of token spent. This allow the pricer to do more complex internal accounting if needed.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.
As we discussed, we can probably satisfy all use-cases with
getExchangeRate()
. It's mutable so it enables internal accounting. Gas reporting hooks can be used to update state and account for which state is updated can be tx.origin or 'spender' as reported by the hook.