From afa4b88259a5b0a56a09fd110830fc3766c9b130 Mon Sep 17 00:00:00 2001 From: Franco NG Date: Fri, 15 Sep 2023 11:10:14 +0200 Subject: [PATCH 1/2] Update registration script in examples/interop --- examples/interop/common/mainchain_registration.ts | 9 +++++++++ .../config/scripts/sidechain_registration.ts | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/examples/interop/common/mainchain_registration.ts b/examples/interop/common/mainchain_registration.ts index cdd2bb1ea2a..83a4a58babe 100644 --- a/examples/interop/common/mainchain_registration.ts +++ b/examples/interop/common/mainchain_registration.ts @@ -123,5 +123,14 @@ export const registerMainchain = async ( }); console.log('Sent mainchain registration transaction. Result from transaction pool is: ', result); + + const authorizeMainchainResult = await mainchainClient.invoke<{ + transactionId: string; + }>('chainConnector_authorize', { + enable: true, + password: 'lisk', + }); + console.log('Authorize Mainchain:', authorizeMainchainResult); + process.exit(0); }; diff --git a/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts b/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts index 082deab672f..f593bb53a62 100644 --- a/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts +++ b/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts @@ -71,6 +71,14 @@ import { sidechainRegParams } from 'lisk-framework'; // Wait for 2 seconds before next registration await wait(WAIT_PERIOD); } + + const authorizeSideChainResult = await sidechainClient.invoke<{ + transactionId: string; + }>('chainConnector_authorize', { + enable: true, + password: 'lisk', + }); + console.log('Authorize Sidechain:', authorizeSideChainResult); } process.exit(0); From aade933ab60e01ce3e4cea76bb2009fc00458d41 Mon Sep 17 00:00:00 2001 From: Franco NG Date: Tue, 19 Sep 2023 11:48:27 +0200 Subject: [PATCH 2/2] Make authorize console.log more clear --- examples/interop/common/mainchain_registration.ts | 2 +- .../pos-mainchain-fast/config/scripts/sidechain_registration.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/interop/common/mainchain_registration.ts b/examples/interop/common/mainchain_registration.ts index 83a4a58babe..939757f5d1c 100644 --- a/examples/interop/common/mainchain_registration.ts +++ b/examples/interop/common/mainchain_registration.ts @@ -130,7 +130,7 @@ export const registerMainchain = async ( enable: true, password: 'lisk', }); - console.log('Authorize Mainchain:', authorizeMainchainResult); + console.log('Authorize Mainchain completed, result:', authorizeMainchainResult); process.exit(0); }; diff --git a/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts b/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts index f593bb53a62..7e0d09cdefa 100644 --- a/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts +++ b/examples/interop/pos-mainchain-fast/config/scripts/sidechain_registration.ts @@ -78,7 +78,7 @@ import { sidechainRegParams } from 'lisk-framework'; enable: true, password: 'lisk', }); - console.log('Authorize Sidechain:', authorizeSideChainResult); + console.log('Authorize Sidechain completed, result:', authorizeSideChainResult); } process.exit(0);