mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Rialto to Millau Transfer Generator (#568)
* Add option to relay for sending transfers to Millau chain * Endow derived accounts on Millau chain * Update message generator entrypoint script to send transfers * Use correct command when sending messages * Send Root messages from Root origin on source chain * Wrap calls from Root Origin in Sudo Call * Allow Root to send messages without paying fees * Use correct variable when sending messages to Rialto * Print warning if no message type is provided to script. * Add note mentioning that certain source origins aren't supported yet * Use correct runtime when initializing header sync * Remove option to send messages as Root * Remove endowment of derived Root accounts * Fix indentation. Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
ee655b1057
commit
f26775d690
@@ -16,7 +16,7 @@ structopt = "0.3.21"
|
||||
# Bridge dependencies
|
||||
|
||||
bp-message-lane = { path = "../../../primitives/message-lane" }
|
||||
bp-rialto = { path = "../../../primitives/rialto" }
|
||||
bp-millau= { path = "../../../primitives/millau" }
|
||||
bp-runtime = { path = "../../../primitives/runtime" }
|
||||
millau-runtime = { path = "../runtime" }
|
||||
pallet-message-lane-rpc = { path = "../../../modules/message-lane/rpc" }
|
||||
|
||||
@@ -14,6 +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_millau::derive_account_from_rialto_id;
|
||||
use millau_runtime::{
|
||||
AccountId, AuraConfig, BalancesConfig, BridgeRialtoConfig, GenesisConfig, GrandpaConfig, SessionConfig,
|
||||
SessionKeys, Signature, SudoConfig, SystemConfig, WASM_BINARY,
|
||||
@@ -121,6 +122,9 @@ impl Alternative {
|
||||
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("George//stash"),
|
||||
get_account_id_from_seed::<sr25519::Public>("Harry//stash"),
|
||||
derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(
|
||||
get_account_id_from_seed::<sr25519::Public>("Dave"),
|
||||
)),
|
||||
],
|
||||
true,
|
||||
)
|
||||
@@ -173,3 +177,13 @@ fn testnet_genesis(
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn derived_dave_account_is_as_expected() {
|
||||
let dave = get_account_id_from_seed::<sr25519::Public>("Dave");
|
||||
let derived: AccountId = derive_account_from_rialto_id(bp_runtime::SourceAccount::Account(dave));
|
||||
assert_eq!(
|
||||
derived.to_string(),
|
||||
"5G81vRqUUysQGtN5aEThD5UsLdt4rZWSbVLkjuZzLHadp8ZD".to_string()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user