diff --git a/programs/nor.ts b/programs/nor.ts index 0a12cce..fa478b9 100644 --- a/programs/nor.ts +++ b/programs/nor.ts @@ -88,6 +88,25 @@ nor await authorizedCall(norContract, 'setNodeOperatorStakingLimit', [operatorId, limit]); }); +nor + .command('set-target-limit') + .description('sets target validators limit') + .option('-o, --operator-id ', 'node operator id') + .option('-l, --limit ', 'target limit') + .action(async (options) => { + const { operatorId, limit } = options; + await authorizedCall(norContract, 'updateTargetValidatorsLimits', [operatorId, true, limit]); + }); + +nor + .command('unset-target-limit') + .description('unsets target validators limit') + .option('-o, --operator-id ', 'node operator id') + .action(async (options) => { + const { operatorId } = options; + await authorizedCall(norContract, 'updateTargetValidatorsLimits', [operatorId, false, 0]); + }); + nor .command('penalized-operators') .description('returns penalties for all operators') diff --git a/programs/staking-router.ts b/programs/staking-router.ts index f8ab74d..fae246f 100644 --- a/programs/staking-router.ts +++ b/programs/staking-router.ts @@ -1,7 +1,7 @@ import { program } from '@command'; import { stakingRouterContract } from '@contracts'; import { authorizedCall, logger } from '@utils'; -import { Result } from 'ethers'; +import { Result, parseEther } from 'ethers'; import { addAccessControlSubCommands, addLogsCommands, addOssifiableProxyCommands, addParsingCommands } from './common'; import { getNodeOperators, getStakingModules } from './staking-module'; @@ -122,8 +122,12 @@ router .command('max-deposits') .description('returns max deposits count for staking module') .argument('', 'module id') - .action(async (moduleId) => { - const deposits = await stakingRouterContract.getStakingModuleMaxDepositsCount(moduleId); + .argument('', 'max deposits value') + .action(async (moduleId, maxDepositsValue) => { + const deposits = await stakingRouterContract.getStakingModuleMaxDepositsCount( + moduleId, + parseEther(maxDepositsValue), + ); logger.log('Max deposits', deposits); }); diff --git a/programs/voting.ts b/programs/voting.ts index d19b881..5d6eb50 100644 --- a/programs/voting.ts +++ b/programs/voting.ts @@ -17,6 +17,14 @@ voting logger.log('Vote', vote.toObject()); }); +voting + .command('vote-time') + .description('returns vote time') + .action(async () => { + const time = await votingContract.voteTime(); + logger.log('Vote time in seconds', Number(time)); + }); + voting .command('votes') .description('returns votes length')