Relay subcommand that performs token RLT <> MLAU token swap (#1141)

* token swap relay

* token swap subcommand fixes

* fmt

* removed debug traces

* removed commented code
This commit is contained in:
Svyatoslav Nikolsky
2021-09-21 17:39:05 +03:00
committed by Bastian Köcher
parent 2db84b74cc
commit 5dbf6ba78c
16 changed files with 861 additions and 97 deletions
+7 -2
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
use bp_runtime::{Chain as ChainBase, TransactionEraOf};
use bp_runtime::{Chain as ChainBase, HashOf, TransactionEraOf};
use codec::{Codec, Encode};
use frame_support::weights::WeightToFeePolynomial;
use jsonrpsee_ws_client::{DeserializeOwned, Serialize};
@@ -25,6 +25,7 @@ use sp_runtime::{
traits::{Block as BlockT, Dispatchable, Member},
EncodedJustification,
};
use sp_transaction_pool::TransactionStatus;
use std::{fmt::Debug, time::Duration};
/// Substrate-based chain from minimal relay-client point of view.
@@ -50,8 +51,12 @@ pub trait Chain: ChainBase + Clone {
type WeightToFee: WeightToFeePolynomial<Balance = Self::Balance>;
}
/// Weight-to-Fee type used by the chain
/// Call type used by the chain.
pub type CallOf<C> = <C as Chain>::Call;
/// Weight-to-Fee type used by the chain.
pub type WeightToFeeOf<C> = <C as Chain>::WeightToFee;
/// Transaction status of the chain.
pub type TransactionStatusOf<C> = TransactionStatus<HashOf<C>, HashOf<C>>;
/// Substrate-based chain with `frame_system::Config::AccountData` set to
/// the `pallet_balances::AccountData<Balance>`.