Near验证者节点质押资金池的参与和管理

质押资金池建立好后,以下是一些常用的查询和操作命令:

1.查询用户 User1 在资金池里的总金额

near view my_validator get_account_total_balance '{"account_id": "user1"}'

2.查询用户 User1 在资金池里质押的金额

near view my_validator get_account_staked_balance '{"account_id": "user1"}'

3.查询用户 User1 在资金池里未质押的金额

near view my_validator get_account_unstaked_balance '{"account_id": "user1"}'

4.查询用户 user1 是否立即提币

near view my_validator is_account_unstaked_balance_available '{"account_id": "user1"}'

5.查询整个资金池质押的币数

near view my_validator get_total_staked_balance '{}'

6.查询质押资金池的拥有者

near view my_validator get_owner_id '{}'

如果想取出质押资金池的币,先取消质押:

near call my_validator unstake'{"amount": "100000000000000000000000000"}'--accountId user1

然后3 个 epoch 之后,再提币:

near call my_validator withdraw'{"amount": "100000000000000000000000000"}'--accountId user1

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。