This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Reward relayer on AH for E->S transfer #165
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yrong
commented
Jul 30, 2024
Comment on lines
-266
to
-279
// Reward relayer from the sovereign account of the destination parachain, only if funds | ||
// are available | ||
let sovereign_account = sibling_sovereign_account::<T>(channel.para_id); | ||
let delivery_cost = Self::calculate_delivery_cost(message.encode().len() as u32); | ||
let amount = T::Token::reducible_balance( | ||
&sovereign_account, | ||
Preservation::Preserve, | ||
Fortitude::Polite, | ||
) | ||
.min(delivery_cost); | ||
if !amount.is_zero() { | ||
T::Token::transfer(&sovereign_account, &who, amount, Preservation::Preserve)?; | ||
} | ||
|
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.
Remove the reward logic here, instead to reward relayer on AH with the fee token transfered from Ethereum.
yrong
commented
Jul 30, 2024
Comment on lines
+280
to
+287
// Burning fees from the relay for teleport | ||
T::Token::burn_from( | ||
&who, | ||
fee, | ||
Preservation::Preserve, | ||
Precision::BestEffort, | ||
Fortitude::Polite, | ||
)?; |
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.
Burn fees from relayer instead of the Parachain sovereign.
yrong
commented
Jul 30, 2024
Comment on lines
+277
to
+282
// No matter what error it is just try to Deposit the asset to beneficiary without | ||
// trapped. | ||
SetErrorHandler(Xcm(vec![DepositAsset { | ||
assets: Definite(asset.clone().into()), | ||
beneficiary: beneficiary.clone(), | ||
}])), |
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.
Add an extra SetErrorHandle
try to Deposit the asset to beneficiary in any case.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.