File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
examples/set-new-validators Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 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' ;
911import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils' ;
1012import { 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 ( {
You can’t perform that action at this time.
0 commit comments