Skip to content
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

devsvcs-168: fix chain module l1 fee calculation #14150

Merged
merged 5 commits into from
Aug 21, 2024
Merged

Conversation

FelixFan1992
Copy link
Contributor

Requires Dependencies

Resolves Dependencies

Copy link
Contributor

I see you updated files related to contracts. Please run pnpm changeset in the contracts directory to add a changeset.

go.mod Outdated Show resolved Hide resolved
@FelixFan1992 FelixFan1992 marked this pull request as ready for review August 19, 2024 22:59
@FelixFan1992 FelixFan1992 requested review from a team as code owners August 19, 2024 22:59
@FelixFan1992 FelixFan1992 removed request for a team August 19, 2024 23:00
@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@ibrajer ibrajer left a comment

Choose a reason for hiding this comment

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

Discussed comments with the author, current changes LGTM.
Leaving possible gas-saving improvements for later as it might blow up the size of this PR.

return SCROLL_ORACLE.getL1Fee(bytes.concat(msg.data, SCROLL_L1_FEE_DATA_PADDING));
constructor() ConfirmedOwner(msg.sender) {}

function getCurrentL1Fee(uint256 dataSize) external view override returns (uint256) {
Copy link
Contributor

Choose a reason for hiding this comment

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

have we tested this function on scroll to see if it is charging reasonably?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. i did some testing with a custom upkeep and this module.
i think we can start with 100 as the coefficient and reduce it to a comfortable number

Copy link
Contributor

@infiloop2 infiloop2 left a comment

Choose a reason for hiding this comment

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

Changes look good to me, just want to confirm if we've done some sanity checks on scroll with the new module

@@ -3,8 +3,12 @@ pragma solidity 0.8.19;

import {IScrollL1GasPriceOracle} from "../../vendor/@scroll-tech/contracts/src/L2/predeploys/IScrollL1GasPriceOracle.sol";
import {ChainModuleBase} from "./ChainModuleBase.sol";
import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol";

contract ScrollModule is ChainModuleBase, ConfirmedOwner {
Copy link
Contributor

Choose a reason for hiding this comment

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

We now have an owner of this chain module, we'll need to add appropriate steps in deployment and setup guide cc @anirudhwarrier

@FelixFan1992 FelixFan1992 added this pull request to the merge queue Aug 21, 2024
Merged via the queue into develop with commit 831d006 Aug 21, 2024
145 of 148 checks passed
@FelixFan1992 FelixFan1992 deleted the devsvcs-168 branch August 21, 2024 19:18
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.

5 participants