3

I have create blockchain using substrate-node-template with aura consensus and which contains own native coin and I have created stable-coin using pallet-contract. This stable token is contract, whenever the transaction occurs between two parties using stable-token, I want to convert the transaction fees from stable token to native coin on flow. Is it possible and if there is any example implementation

1 Answer 1

3

The default implementation is using the native token.

You should revert your stable-coin changes.

Balances is the native token pallet.

https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L283

And pass it to transaction payment's CurrencyAdapter.

https://github.com/substrate-developer-hub/substrate-node-template/blob/700c3a186e55d0d6542c564ccff17260238ed752/runtime/src/lib.rs#L254

That's it.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.