-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add various 'at-block' programs and 'chain' programs #5
base: main
Are you sure you want to change the base?
Conversation
programs/staking-router.ts
Outdated
router | ||
.command('modules-at-block') | ||
.description('returns staking modules') | ||
.argument('<block-tag>', 'blockTag') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's better to add an option with the default value latest
to modules
command?
programs/dsm.ts
Outdated
const lastDepositBlock = await stakingRouterContract.getStakingModuleLastDepositBlock(moduleId); | ||
const minDepositBlockDistance = await dsmContract.getMinDepositBlockDistance(); | ||
|
||
const result = BigInt(block.number) - BigInt(lastDepositBlock) >= BigInt(minDepositBlockDistance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a regular Number? it should be in the range
programs/common/consensus.ts
Outdated
.description('returns the closest report for specific block') | ||
.argument('<block-tag>', 'blockTag') | ||
.action(async (blockTag) => { | ||
const report = await getClosestReport(contract, parseInt(blockTag, 10)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would suggest keep 1 command but with option with default value latest
No description provided.