Skip to content

Commit 6b433ea

Browse files
committed
cleanup
1 parent 3ef6f64 commit 6b433ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/set-new-validators/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
createRollupFetchTransactionHash,
66
createRollupPrepareTransactionReceipt,
77
rollupAdminLogicPublicActions,
8+
// Uncomment it when you want to use getValidators() to get validator status
9+
// getValidators,
810
} from '@arbitrum/orbit-sdk';
911
import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils';
1012
import { config } from 'dotenv';
@@ -76,6 +78,17 @@ async function main() {
7678
`Before executing, the address ${newValidators[0]} status in validator list is ${beforeStatus}`,
7779
);
7880

81+
/*
82+
You can also use the following code to check validator status, it will return a list
83+
of whitelist validators.
84+
85+
console.log('Fetching current validator address list in the parent chain...');
86+
const beforeValidatorList = await getValidators(parentChainPublicClient, {
87+
rollup: coreContracts.rollup,
88+
});
89+
console.log(`Before executing, the validator list is ${beforeValidatorList.validators}`);
90+
*/
91+
7992
// prepare set validator transaction request
8093
const setValidatorTransactionRequest =
8194
await parentChainPublicClient.rollupAdminLogicPrepareTransactionRequest({

0 commit comments

Comments
 (0)