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

[Preimage] Support for updating token transfer fee on AssetHub #1152

Closed
wants to merge 14 commits into from

Conversation

vgeddes
Copy link
Collaborator

@vgeddes vgeddes commented Mar 9, 2024

The pricing-parameters command now generates a preimage that:

  1. Updates pricing parameters on BridgeHub
  2. Updates token transfer base fee on AssetHub

Example:

$ target/debug/snowbridge-preimage  pricing-parameters --exchange-rate-numerator 1 --exchange-rate-denominator 375 --fee-per-gas 50 --local-reward 1_000_000_000_00 --remote-reward 1_000_000_000_000
BridgeHub:
  ExchangeRate: 0.0026666666666666666 ETH/ROC
  FeePerGas: 50.000000000 GWEI
  LocalReward: 0.100000000000 ROC [100000000000 PLANCK]
  RemoteReward: 0.000001000000000000 ETH [1000000000000 WEI]
AssetHub:
  BaseFee: 5.878563166665 ROC, [5878563166665 PLANCK]
0x1a0008630003000100d50f030c2f00000602024beb73753c89015302abaa66b751790900000000000000000000e876481700000000000000000000000010a5d4e800000000000000000000000000000000000000000000000000000000743ba40b0000000000000000000000000000000000000000000000000000002000630003000100a10f030c2f000006028aad071b0094000404405fbc5c7ba58845ad1f1a9a7c5bc12fad40c959abb55805000000000000000000002000

Copy link

codecov bot commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.71%. Comparing base (16229c1) to head (30f9716).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1152      +/-   ##
==========================================
+ Coverage   78.92%   80.71%   +1.78%     
==========================================
  Files          13       12       -1     
  Lines         408      394      -14     
  Branches       74       72       -2     
==========================================
- Hits          322      318       -4     
+ Misses         69       59      -10     
  Partials       17       17              
Flag Coverage Δ
solidity 80.71% <ø> (+1.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vgeddes vgeddes changed the title Improve preimage tool Preimage tool now adds support for updating fee on AssetHub Mar 10, 2024
@vgeddes vgeddes changed the title Preimage tool now adds support for updating fee on AssetHub [Preimage] Support for updating token transfer fee on AssetHub Mar 10, 2024
Comment on lines -110 to -112
if (destinationChainFee == 0) {
revert InvalidDestinationFee();
}
Copy link
Contributor

@yrong yrong Mar 12, 2024

Choose a reason for hiding this comment

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

Just curious why remove this check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, that was made in error somehow. I will revert

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

its due to some kind of merge conflict / stale branch issue on Github

@vgeddes vgeddes closed this Mar 23, 2024
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.

2 participants