Merge PR #3857: Remove Shares Concept from Unbond/Redelegate UX
* Remove shares concept from unbonding and redelegation * Remove redundant staking REST type declerations * Rename staking REST request types * Fix slashing tests * Fix staking tests * Fix integration tests * Add safety checks for when validator tokens are zero * Attempt to fix simulation * Add pending log entry * Update docs * Implement and use SharesFromTokens * Rename ShareTokens and ShareTokensTruncated * Rename Delegation to Amount in DelegateRequest * Implement and use SharesFromTokensTruncated * Update MsgDelegate to use Amount instead of Value * Use constructors in staking sim messages * Implement and use ValidateUnbondAmount
This commit is contained in:
committed by
frog power 4000
parent
2788c2250d
commit
59765cecb1
@@ -76,7 +76,7 @@ When a validator wishes to withdraw their transaction fees it must send
|
||||
triggered each with any change in individual delegations, such as an unbond,
|
||||
redelegation, or delegation of additional tokens to a specific validator. This
|
||||
transaction withdraws the validators commission rewards, as well as any rewards
|
||||
earning on their self-delegation.
|
||||
earning on their self-delegation.
|
||||
|
||||
```golang
|
||||
type TxWithdrawValidator struct {
|
||||
|
||||
@@ -376,12 +376,13 @@ gaiacli query staking delegations <delegator_addr>
|
||||
|
||||
#### Unbond Tokens
|
||||
|
||||
If for any reason the validator misbehaves, or you just want to unbond a certain amount of tokens, use this following command. You can unbond a specific `shares-amount` (eg:`12.1`\) or a `shares-fraction` (eg:`0.25`) with the corresponding flags.
|
||||
If for any reason the validator misbehaves, or you just want to unbond a certain
|
||||
amount of tokens, use this following command.
|
||||
|
||||
```bash
|
||||
gaiacli tx staking unbond \
|
||||
--validator=<account_cosmosval> \
|
||||
--shares-fraction=0.5 \
|
||||
<validator_addr> \
|
||||
10atom \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
@@ -414,9 +415,9 @@ A redelegation is a type delegation that allows you to bond illiquid tokens from
|
||||
|
||||
```bash
|
||||
gaiacli tx staking redelegate \
|
||||
--addr-validator-source=<account_cosmosval> \
|
||||
--addr-validator-dest=<account_cosmosval> \
|
||||
--shares-fraction=50 \
|
||||
<src-validator-operator-addr> \
|
||||
<dst-validator-operator-addr> \
|
||||
10atom \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
|
||||
@@ -375,13 +375,12 @@ gaiacli query staking delegation <delegator_addr(위임자 코스모스 주소)>
|
||||
|
||||
만약 특정 검증인이 악의적인 행동을 했거나 또는 본인이 개인적인 이유로 일부 토큰을 언본딩을 워하는 경우 다음 명령어를 통해 토큰을 언본딩 할 수 있습니다. 언본딩은 정확한 수량인 `shares-amount`(예시, `12.1`) 또는 언본딩을 원하는 물량의 비율인 `shares-fraction`(예시, `0.25`) 값으로 표현될 수 있습니다.
|
||||
|
||||
|
||||
```bash
|
||||
gaiacli tx staking unbond \
|
||||
--validator=<account_cosmosval(검증인 cosmosval 주소)> \
|
||||
--shares-fraction=0.5 \
|
||||
--from=<key_name(트랜잭션을 발생시킬 키/계정 이름)> \
|
||||
--chain-id=<chain_id(체인 아이디)>
|
||||
<validator_addr> \
|
||||
10atom \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
|
||||
언본딩은 언본딩 기간이 끝나는 대로 완료됩니다.
|
||||
@@ -412,11 +411,11 @@ gaiacli query staking unbonding-delegations-from <account_cosmosval(검증인 co
|
||||
|
||||
```bash
|
||||
gaiacli tx staking redelegate \
|
||||
--addr-validator-source=<account_cosmosval(스테이킹을 취소할 검증인의 cosmosval 주소)> \
|
||||
--addr-validator-dest=<account_cosmosval(스테이킹을 받을 검증인의 cosmosval 주소)> \
|
||||
--shares-fraction=50 \
|
||||
--from=<key_name(트랜잭션을 발생시킬 키/계정 이름)> \
|
||||
--chain-id=<chain_id(체인 아이디)>
|
||||
<src-validator-operator-addr> \
|
||||
<dst-validator-operator-addr> \
|
||||
10atom \
|
||||
--from=<key_name> \
|
||||
--chain-id=<chain_id>
|
||||
```
|
||||
|
||||
위 예시와 같이 재위임될 토큰의 수량은 특정 수량(`shares-amount`) 또는 일정 비율(`shares-fraction`)로 표현될 수 있습니다.
|
||||
|
||||
Reference in New Issue
Block a user