-
Notifications
You must be signed in to change notification settings - Fork 3
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 helpers for fee currency handling #72
Comments
There's one extra method so far that I see needed. The balance of a user has the l1cost of rollup deducted to check for tx costs. For this I'm needing a method that translate this l1cost in native currency to a feecurrency. However we can think of a different approach and directly ask what's the L1Cost of a feecurrency. personal preference: that the cmp method receives only two values instead of 4, but that can be workaround and not' important (I always have to squint my eyes to double check that the first 2 values correspond to the first tx and the 3rd and 4th to the second tx). All of this, being in the context of the txpool, has to be dependant of the txpool muted and change in a 1:1 fashion to the 'currentStateDb' of the txpool. I see as a little more explicit directly taking this value in the signatures (for easily reading) but I also understand the value on not sending it and treating this as also a possible cache fixed to one statedb. |
Implemented in celo-org/op-geth#27. |
In the txpool we need a new interface that provides information required for handling fee currencies.
FeeContext
:IsWhitelisted(feeCurrency address): bool
GetBalanceOf(account address, feeCurrency address): int
CompareFees(fee1 int, feCurrency1 address, fee2 int, feeCurrency2 address): int
@hbandura Please have a look and add things that would help you. Also please improve naming if you have better ideas :)
The text was updated successfully, but these errors were encountered: