-
Notifications
You must be signed in to change notification settings - Fork 5
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
SYS-4189 multi currency support #435
Conversation
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.
Overall nice work. Is it possible to avoid the hardcoding of mnemonics and the dependency between accounts and genesis.
@@ -211,7 +233,7 @@ impl<T: Config> Pallet<T> { | |||
|
|||
pub(crate) fn charge_fee( | |||
proof: &Proof<T::Signature, T::AccountId>, | |||
payment_info: PaymentInfo<T::AccountId, BalanceOf<T>, T::Signature>, | |||
payment_info: PaymentInfo<T::AccountId, BalanceOf<T>, T::Signature, T::Token>, |
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.
can this be abused? meaning any ERC20 token can be used as a payment proof?
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 a good question. If someone sends a transaction direct to chain, and decides to pay for it, it will be done voluntarily (the whole payment_info is optional). The real check to make sure supported
tokens are used as payment is done in the gateway by the relayer.
…ain into nahu-sys-4189-multiCurrencySupport
Proposed changes
This PR enables support for multi currency payment when sending transactions via the Gateway. This means users will be able to pay Relayers in a variety of ERC20 tokens.
Tests and Benchmarks are also updated to be compatible.
Type of change/Merge
🚨What type of change is this PR?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.