[Hotfix] Fix computation period of the fee for billing #34
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.
The billing query ran today with the incorrect per block fee. The reason is that we used the September fee (computed over August) as a basis. However, today's billing period started in August so the August fee (computed over July) should have been used.
At the same time we need to post the new period's fee (since we are in September computed over August).
This PR fixes this by differentiating between the
billingFeeComputationPeriod
(based on current day - 1 week) and the newfeeComputationPeriod
Test Plan
Ran on sepolia: https://sepolia.etherscan.io/tx/0x0acfd563f283befb5376ae545689801d20c246a4a7b4768dfb583dd14211ff33#eventlog