cli: deprecate --name in favor of --from
This commit is contained in:
@@ -59,7 +59,7 @@ func TestGaiaCLISend(t *testing.T) {
|
||||
fooAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooCech, flags))
|
||||
require.Equal(t, int64(50), fooAcc.GetCoins().AmountOf("steak").Int64())
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo", flags, barCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --from=foo", flags, barCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
barAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
|
||||
@@ -68,7 +68,7 @@ func TestGaiaCLISend(t *testing.T) {
|
||||
require.Equal(t, int64(40), fooAcc.GetCoins().AmountOf("steak").Int64())
|
||||
|
||||
// test autosequencing
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo", flags, barCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --from=foo", flags, barCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
|
||||
@@ -77,7 +77,7 @@ func TestGaiaCLISend(t *testing.T) {
|
||||
require.Equal(t, int64(30), fooAcc.GetCoins().AmountOf("steak").Int64())
|
||||
|
||||
// test memo
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo --memo 'testmemo'", flags, barCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --from=foo --memo 'testmemo'", flags, barCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
barAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
|
||||
@@ -111,7 +111,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {
|
||||
barCech := sdk.MustBech32ifyAcc(barAddr)
|
||||
barCeshPubKey := sdk.MustBech32ifyValPub(barPubKey)
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --name=foo", flags, barCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli send %v --amount=10steak --to=%v --from=foo", flags, barCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
barAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", barCech, flags))
|
||||
@@ -121,7 +121,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {
|
||||
|
||||
// create validator
|
||||
cvStr := fmt.Sprintf("gaiacli stake create-validator %v", flags)
|
||||
cvStr += fmt.Sprintf(" --name=%v", "bar")
|
||||
cvStr += fmt.Sprintf(" --from=%v", "bar")
|
||||
cvStr += fmt.Sprintf(" --address-validator=%v", barCech)
|
||||
cvStr += fmt.Sprintf(" --pubkey=%v", barCeshPubKey)
|
||||
cvStr += fmt.Sprintf(" --amount=%v", "2steak")
|
||||
@@ -139,7 +139,7 @@ func TestGaiaCLICreateValidator(t *testing.T) {
|
||||
|
||||
// unbond a single share
|
||||
unbondStr := fmt.Sprintf("gaiacli stake unbond begin %v", flags)
|
||||
unbondStr += fmt.Sprintf(" --name=%v", "bar")
|
||||
unbondStr += fmt.Sprintf(" --from=%v", "bar")
|
||||
unbondStr += fmt.Sprintf(" --address-validator=%v", barCech)
|
||||
unbondStr += fmt.Sprintf(" --address-delegator=%v", barCech)
|
||||
unbondStr += fmt.Sprintf(" --shares-amount=%v", "1")
|
||||
@@ -181,7 +181,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
fooAcc := executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooCech, flags))
|
||||
require.Equal(t, int64(50), fooAcc.GetCoins().AmountOf("steak").Int64())
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov submitproposal %v --proposer=%v --deposit=5steak --type=Text --title=Test --description=test --name=foo", flags, fooCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov submitproposal %v --proposer=%v --deposit=5steak --type=Text --title=Test --description=test --from=foo", flags, fooCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
fooAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooCech, flags))
|
||||
@@ -191,7 +191,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
require.Equal(t, int64(1), proposal1.ProposalID)
|
||||
require.Equal(t, gov.StatusToString(gov.StatusDepositPeriod), proposal1.Status)
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov deposit %v --depositer=%v --deposit=10steak --proposalID=1 --name=foo", flags, fooCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov deposit %v --depositer=%v --deposit=10steak --proposalID=1 --from=foo", flags, fooCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
fooAcc = executeGetAccount(t, fmt.Sprintf("gaiacli account %v %v", fooCech, flags))
|
||||
@@ -200,7 +200,7 @@ func TestGaiaCLISubmitProposal(t *testing.T) {
|
||||
require.Equal(t, int64(1), proposal1.ProposalID)
|
||||
require.Equal(t, gov.StatusToString(gov.StatusVotingPeriod), proposal1.Status)
|
||||
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov vote %v --proposalID=1 --voter=%v --option=Yes --name=foo", flags, fooCech), pass)
|
||||
executeWrite(t, fmt.Sprintf("gaiacli gov vote %v --proposalID=1 --voter=%v --option=Yes --from=foo", flags, fooCech), pass)
|
||||
tests.WaitForNextHeightTM(port)
|
||||
|
||||
vote := executeGetVote(t, fmt.Sprintf("gaiacli gov query-vote --proposalID=1 --voter=%v --output=json %v", fooCech, flags))
|
||||
|
||||
@@ -220,7 +220,7 @@ gaiacli stake create-validator \
|
||||
--address-validator=<account_cosmosaccaddr>
|
||||
--moniker="choose a moniker" \
|
||||
--chain-id=gaia-6002 \
|
||||
--name=<key_name>
|
||||
--from=<key_name>
|
||||
```
|
||||
|
||||
### Edit Validator Description
|
||||
@@ -237,7 +237,7 @@ gaiacli stake edit-validator
|
||||
--keybase-sig="6A0D65E29A4CBC8E"
|
||||
--details="To infinity and beyond!"
|
||||
--chain-id=gaia-6002 \
|
||||
--name=<key_name>
|
||||
--from=<key_name>
|
||||
```
|
||||
|
||||
### View Validator Description
|
||||
@@ -272,7 +272,7 @@ gaiad start
|
||||
Wait for your full node to catch up to the latest block. Next, run the following command. Note that `<cosmosaccaddr>` is the address of your validator account, and `<name>` is the name of the validator account. You can find this info by running `gaiacli keys list`.
|
||||
|
||||
```bash
|
||||
gaiacli stake unrevoke <cosmosaccaddr> --chain-id=gaia-6002 --name=<name>
|
||||
gaiacli stake unrevoke <cosmosaccaddr> --chain-id=gaia-6002 --from=<name>
|
||||
```
|
||||
|
||||
**WARNING:** If you don't wait for `gaiad` to sync before running `unrevoke`, you will receive an error message telling you your validator is still jailed.
|
||||
@@ -321,7 +321,7 @@ gaiacli stake delegate \
|
||||
--amount=10steak \
|
||||
--address-delegator=<account_cosmosaccaddr> \
|
||||
--address-validator=<validator_cosmosaccaddr> \
|
||||
--name=<key_name> \
|
||||
--from=<key_name> \
|
||||
--chain-id=gaia-6002
|
||||
```
|
||||
|
||||
@@ -338,7 +338,7 @@ gaiacli stake unbond \
|
||||
--address-delegator=<account_cosmosaccaddr> \
|
||||
--address-validator=<validator_cosmosaccaddr> \
|
||||
--shares=MAX \
|
||||
--name=<key_name> \
|
||||
--from=<key_name> \
|
||||
--chain-id=gaia-6002
|
||||
```
|
||||
|
||||
@@ -361,7 +361,7 @@ gaiacli stake delegation \
|
||||
gaiacli send \
|
||||
--amount=10faucetToken \
|
||||
--chain-id=gaia-6002 \
|
||||
--name=<key_name> \
|
||||
--from=<key_name> \
|
||||
--to=<destination_cosmosaccaddr>
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user