-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: Add channel opening fee to *DepositAddressReady Events #4609
Conversation
state-chain/traits/src/lib.rs
Outdated
@@ -51,7 +51,8 @@ pub trait Chainflip: frame_system::Config { | |||
+ FixedPointOperand | |||
+ MaybeSerializeDeserialize | |||
+ Bounded | |||
+ Sum<Self::Amount>; | |||
+ Sum<Self::Amount> | |||
+ Into<u128>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok if I add this trait bound here?
I find this the easiest way to accomplish the conversion, but maybe there is some other way around without having to change this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the way it's done elsewhere is to add and Amount
associated type to the (DepositApi) trait then it's possible to express in the type constraints that the types are equal (ie. in the pallet config would be DepositApi<Amount = T::Amount>
.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4609 +/- ##
======================================
- Coverage 72% 72% -0%
======================================
Files 401 402 +1
Lines 66787 66943 +156
Branches 66787 66943 +156
======================================
+ Hits 48412 48464 +52
- Misses 16026 16137 +111
+ Partials 2349 2342 -7 ☔ View full report in Codecov by Sentry. |
ChannelOpeningFeePaid { | ||
fee: T::Amount, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth keeping the event here too.
state-chain/traits/src/lib.rs
Outdated
@@ -51,7 +51,8 @@ pub trait Chainflip: frame_system::Config { | |||
+ FixedPointOperand | |||
+ MaybeSerializeDeserialize | |||
+ Bounded | |||
+ Sum<Self::Amount>; | |||
+ Sum<Self::Amount> | |||
+ Into<u128>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the way it's done elsewhere is to add and Amount
associated type to the (DepositApi) trait then it's possible to express in the type constraints that the types are equal (ie. in the pallet config would be DepositApi<Amount = T::Amount>
.
I can fix the above and get this merged. Keen for it to be included in v1.3. |
@@ -65,7 +65,7 @@ impl<C: Chain, T: Chainflip> MockDepositHandler<C, T> { | |||
), | |||
ForeignChain::Bitcoin => todo!("Bitcoin address"), | |||
}, | |||
1u128, | |||
Default::default(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is change in behaviour - If we expected this to be one 1 anywhere, we could use One::one .
…ncoding * origin/main: (21 commits) chore: update chainspecs (#4615) feat: Add channel opening fee to *DepositAddressReady Events (#4609) refactor: pass out CFE incompatibility exit information to main (#4563) feat: Introduce tx fee multiplier storage item (#4594) fix: debug cli (#4605) fix: patch 1.2 broker test (#4607) feat: add block height and deposit details to PrewitnessedDeposit (#4606) chore: add myself as codeowner to upgrade-test (#4603) fix: RUSTSEC-2024-0019 (#4604) fix: upgrade test pnpm install from commit (#4600) chore: add notification on failed release build (#4589) chore: add Zellic audit to Security.md (#4599) update changelog for 1.2.1 (#4597) fix: use correct pnpm deps for upgrade-test (#4596) chore(bouncer): Use stable sdk version (#4595) chore(bouncer): Update sdk to 1.2.1 (#4582) log meaningful message if docker login fails (#4553) Added bouncer command to download a runtime update from a proposal (#4592) chore: add asset to withdrawal event (#4590) ingress-egress-tracker: add tx_ref to redis (#4573) ... # Conflicts: # state-chain/runtime/src/lib.rs
…utxo * origin/main: fix "get_proposed_runtime" command (#4624) fix: allow OldAsset to support unambiguously encoding Arb USDC and Eth USDC, while maintaining backcompat (PRO-1237) (#4614) fix: start localnet using correct commit (#4623) chore: migration housekeeping (#4612) feat: add arbitrum support (PRO-1154) (#4486) fix: swap subscription amounts as hex (#4611) feat: use swapping queue when swapping network fee for burn (#4584) chore: update chainspecs (#4615) feat: Add channel opening fee to *DepositAddressReady Events (#4609) refactor: pass out CFE incompatibility exit information to main (#4563) feat: Introduce tx fee multiplier storage item (#4594) fix: debug cli (#4605) fix: patch 1.2 broker test (#4607) feat: add block height and deposit details to PrewitnessedDeposit (#4606) chore: add myself as codeowner to upgrade-test (#4603) fix: RUSTSEC-2024-0019 (#4604) # Conflicts: # state-chain/pallets/cf-environment/src/lib.rs
Pull Request
Closes: PRO-1233
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Added channel_opening_fee field to the events:
Breaking changes