Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Add Authoize function to example scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Phanco committed Nov 2, 2023
1 parent c1f8c60 commit 8bd9606
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/interop/common/mainchain_registration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,14 @@ export const registerMainchain = async (mc: string, sc: string, sidechainDevVali
});

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 completed, result:', authorizeMainchainResult);

process.exit(0);
};
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ import { keys } from '../default/dev-validators.json';
// 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 completed, result:', authorizeSideChainResult);
}

process.exit(0);
Expand Down

0 comments on commit 8bd9606

Please sign in to comment.