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

[R4R]-[fee]feat: add gas-oracle module and set&update tokenRatio(ETH/MNT) GasPriceOracle.sol #41

Merged
merged 10 commits into from
Nov 29, 2023

Conversation

Tri-stone
Copy link
Contributor

@Tri-stone Tri-stone commented Nov 15, 2023

Core changes:

  • add tokenRatio in GasPriceOracle to set tokenRatio(ETH/MNT)
  • add two roles in GasPriceOracle.sol
    • only Operator can update tokenRatio
    • only Owner can set Operator
  • add gas-oracle module
    • get tokenRatio(ETH/MNT) from several price oracles
    • update tokenRatio in GasPriceOracle.sol frequently
  • set default L2 Block GasLimit as 0x4000000000000 first, will change later

Releated PR:

Copy link

Ran 109 test suites: 531 tests passed😊, 0 failed😂, 0 skipped (531 total tests)

Copy link

Ran 109 test suites: 531 tests passed😊, 0 failed😂, 0 skipped (531 total tests)

@abelliumnt
Copy link
Contributor

No other comment

Copy link

Ran 109 test suites: 531 tests passed😊, 0 failed😂, 0 skipped (531 total tests)

abelliumnt
abelliumnt previously approved these changes Nov 21, 2023
byteflyfunny
byteflyfunny previously approved these changes Nov 21, 2023
// Slot 0x00 (0) is the slot of tokenRatio
common.Hash{}: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000001194"),
// Slot 0x01 (1) is the slot of owner
common.Hash{31: 0x01}: common.HexToHash("0x000000000000000000000000bda5747bfd65f08deb54cb465eb87d40e51b197e"),
Copy link
Contributor

Choose a reason for hiding this comment

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

For mainnet, do we need to update this value? Maybe we need to read gasOracleOwner from deploy-config.json

Copy link
Contributor Author

@Tri-stone Tri-stone Nov 29, 2023

Choose a reason for hiding this comment

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

Fixed, after deployment, will check the on-chain data with configs.

byteflyfunny
byteflyfunny previously approved these changes Nov 29, 2023
Copy link

Ran 109 test suites: 531 tests passed😊, 0 failed😂, 0 skipped (531 total tests)

Copy link

Ran 109 test suites: 531 tests passed😊, 0 failed😂, 0 skipped (531 total tests)

@Tri-stone Tri-stone merged commit 5b1faec into develop Nov 29, 2023
2 checks passed
@Tri-stone Tri-stone deleted the leo/fee_collection_gas_oracle branch January 25, 2024 02:02
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.

None yet

3 participants