Skip to content
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

[ioctl] Add CandidateEndorsement and CandidateActivate action #4194

Merged
merged 6 commits into from
Apr 7, 2024

Conversation

envestcc
Copy link
Member

Description

Fixes #4191

Type of change

Please delete options that are not relevant.

  • Code refactor or improvement

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.76%. Comparing base (e1f0636) to head (b59cd99).
Report is 221 commits behind head on master.

❗ Current head b59cd99 differs from pull request most recent head 6e00609. Consider uploading reports for the commit 6e00609 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4194      +/-   ##
==========================================
+ Coverage   75.38%   76.76%   +1.38%     
==========================================
  Files         303      340      +37     
  Lines       25923    29269    +3346     
==========================================
+ Hits        19541    22469    +2928     
- Misses       5360     5695     +335     
- Partials     1022     1105      +83     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


_stake2EndorseCmdShorts = map[config.Language]string{
config.English: "Endorse bucket's candidate on IoTeX blockchain",
config.Chinese: "在 IoTeX 区块链上给质押票的候选人背书",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:
在 IoTeX 区块链上背书候选人
在 IoTeX 区块链上撤销背书
this is more clear and straightforward?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@@ -20,12 +20,12 @@ import (
var (
_registerCmdUses = map[config.Language]string{
config.English: "register NAME (ALIAS|OPERATOR_ADDRESS) (ALIAS|REWARD_ADDRESS) (ALIAS|OWNER_ADDRESS) AMOUNT_IOTX STAKE_DURATION [DATA] [--auto-stake] [-s SIGNER] [-n NONCE] [-l GAS_LIMIT] [-p GAS_PRICE] [-P PASSWORD] [-y]",
config.Chinese: "register 名字 (别名|操作者地址)(别名|奖励地址)(别名|所有者地址)IOTX数量 质押持续时间 [数据] [--auto-stake] [-s 签署人] [-n NONCE] [-l GAS限制] [-p GAS价格] [-P 密码] [-y]",
config.Chinese: "register 名字 (别名 | 操作者地址)(别名 | 奖励地址)(别名 | 所有者地址)IOTX 数量 质押持续时间 [数据] [--auto-stake] [-s 签署人] [-n NONCE] [-l GAS 限制] [-p GAS 价格] [-P 密码] [-y]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need to do this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto-formated by ide, reverted

}

_registerCmdShorts = map[config.Language]string{
config.English: "Register a candidate",
config.Chinese: "在IoTeX区块链上注册候选人",
config.Chinese: "在 IoTeX 区块链上注册候选人",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need to do this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted

@envestcc envestcc requested a review from millken as a code owner April 1, 2024 02:09
@@ -27,11 +27,11 @@ var (

_stake2EndorseCmdShorts = map[config.Language]string{
config.English: "Endorse bucket's candidate on IoTeX blockchain",
config.Chinese: "在 IoTeX 区块链上给质押票的候选人背书",
config.Chinese: "在 IoTeX 区块链上背书候选人",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 2 spaces

}
_stake2UnEndorseCmdShorts = map[config.Language]string{
config.English: "UnEndorse bucket's candidate on IoTeX blockchain",
config.Chinese: "在 IoTeX 区块链上给质押票的背书进行撤销",
config.Chinese: "在 IoTeX 区块链上撤销背书",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 2 spaces

Copy link

sonarcloud bot commented Apr 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
8.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@envestcc envestcc merged commit 40ee548 into iotexproject:master Apr 7, 2024
2 of 3 checks passed
@envestcc envestcc deleted the pr-ioctlendorse branch April 7, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add ioctl command for delegate endorsement
3 participants