From 0a7c25deb5ae6119598eca7024bd9c2cf19ce511 Mon Sep 17 00:00:00 2001 From: abhiyana Date: Fri, 9 Feb 2024 09:48:52 +0530 Subject: [PATCH] refactor: change insert_keys function, from js script to curl command --- parachain/parachain.star | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/parachain/parachain.star b/parachain/parachain.star index e90c122..7350bb7 100644 --- a/parachain/parachain.star +++ b/parachain/parachain.star @@ -252,9 +252,10 @@ def run_testnet_mainnet(plan, chain_type, relaychain_name, parachain): def insert_keys(plan, service_name, private_phrase, sudo_key_in_hex, uri): - original_command = 'curl -vH \'Content-Type: application/json\' --data \'{{ "jsonrpc":"2.0", "method":"author_insertKey", "params":["aura", {0}, {1}],"id":1 }}\' {2}' + original_command = 'curl -vH \'Content-Type: application/json\' --data \'{{"jsonrpc":"2.0", "method":"author_insertKey", "params":["aura", "{0}", "{1}"], "id":1}}\' {2}' modified_command = original_command.format(private_phrase, sudo_key_in_hex, uri) + plan.print(modified_command) plan.run_sh( - run = modified_command, - image = "curlimages/curl:latest" - ) \ No newline at end of file + run=modified_command, + image="curlimages/curl:latest" + )