-
Notifications
You must be signed in to change notification settings - Fork 71
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
Specify the currency for the execution fee #461
Conversation
…ken of the recipient chain
15bc38d
to
28c77e1
Compare
d3538ae
to
b6392d5
Compare
b6392d5
to
2d8387c
Compare
484439e
to
93c9877
Compare
93c9877
to
955fd18
Compare
13a6dab
to
0ad89ef
Compare
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.
The code is now much cleaner, making it easier for me to read and understand. 👍
b7ebf10
to
27f51dd
Compare
9d183cc
to
7c2f3e2
Compare
pallets/automation-time/src/fees.rs
Outdated
new_test_ext(0).execute_with(|| { | ||
let destination = MultiLocation::new(1, X1(Parachain(PARA_ID))); | ||
let alice = AccountId32::new(ALICE); | ||
let mut spy = 0; |
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.
What does the variable spy
mean?
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.
let’s call it has_callback_run
and set it initially false.
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.
Fixed
} | ||
|
||
#[test] | ||
fn call_pay_checked_fees_for_with_alternate_flow_and_no_execution_fee_success() { |
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 will_fail
case for alternate flow not needed?
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.
execution_fee in alternate flow is not deducted on our side but after XCM, so there’s no insufficient_execution_fee
case.
pallets/automation-time/src/fees.rs
Outdated
new_test_ext(0).execute_with(|| { | ||
let destination = MultiLocation::new(1, X1(Parachain(PARA_ID))); | ||
let alice = AccountId32::new(ALICE); | ||
let mut spy = 0; |
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.
let’s call it has_callback_run
and set it initially false.
} | ||
|
||
#[test] | ||
fn call_pay_checked_fees_for_with_alternate_flow_and_no_execution_fee_success() { |
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.
execution_fee in alternate flow is not deducted on our side but after XCM, so there’s no insufficient_execution_fee
case.
3581e1a
to
6e7f5c3
Compare
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.
The comments are all addressed.
@@ -19,6 +19,7 @@ | |||
use crate::{AccountOf, Action, ActionOf, Config, Error, MultiBalanceOf, Pallet}; | |||
|
|||
use frame_support::traits::Get; | |||
use frame_system::RawOrigin; |
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.
Why is the addition of this line? Is it necessary?
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.
Yes.
During testing, we require Root permissions to deposit funds into the test account.
We have implemented the functionality to specify different currencies as the execution fee.
Based on whether the currency is native or foreign, we have employed different processing flows and XCM instructions.