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

R4R: Add fees and memo to REST, updated CLI to receive coins as fees #3069

Merged
merged 62 commits into from
Dec 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b55e748
pending
Dec 4, 2018
f3d5279
Split endpoints and use utils
Dec 5, 2018
9bea121
Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into f…
Dec 5, 2018
dcd7ecd
fix lcd tests
Dec 5, 2018
5af8fd6
change input msg types
Dec 5, 2018
b19d9ed
update and rearrange swagger file
Dec 5, 2018
0ee236a
Updated swagger
Dec 5, 2018
5bd2544
update delegations to use POST
Dec 6, 2018
8b794d2
update pending
Dec 6, 2018
9286098
Update tx.go
fedekunze Dec 7, 2018
c4765b2
Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into f…
Dec 10, 2018
3f744f8
fix genOnly REST, closes #3020
Dec 10, 2018
6fd34a9
fixes based on tests
Dec 10, 2018
03771a3
fix lint
Dec 10, 2018
7959e0b
Add fees to REST, update CLI to receive multiple coins as fees, added…
Dec 10, 2018
41d5cae
update swagger
Dec 10, 2018
6f6a4f8
add helper example to fee flag
Dec 10, 2018
58d4b8f
remove sdk.Coin from fees
Dec 10, 2018
e4e537a
fix conflicts and update functions based on Alessio's PR
Dec 11, 2018
b4a307b
fix comments on cli_tests and added simulation update
Dec 11, 2018
a90fca5
Update cli_test.go
fedekunze Dec 11, 2018
db07298
fix conflicts
Dec 11, 2018
9c82e31
Merge branch 'jack/dry-rest-tests' of https://github.com/cosmos/cosmo…
Dec 11, 2018
91f0818
commit to pull split changes
Dec 11, 2018
e3c0eb3
use req.BaseReq everywhere
Dec 11, 2018
64e7e6b
cleanup test_helper
Dec 11, 2018
e76c5c5
Merge develop
Dec 11, 2018
e36daa7
update tests
Dec 11, 2018
1835560
fixed some tests
Dec 11, 2018
8049985
flags
Dec 12, 2018
714c659
fix conflicts from develop
Dec 12, 2018
c2a4444
add balance checks on tests
Dec 12, 2018
017c305
fixes and modifications in gas
Dec 12, 2018
6484813
more balance checks
Dec 12, 2018
d429779
add TxEncoder changes
Dec 14, 2018
64b2b3f
fix tests
Dec 14, 2018
4b59216
cleanup
Dec 14, 2018
aaeee73
PENDING
Dec 14, 2018
4358e63
fix lint
Dec 14, 2018
e687ac9
Apply suggestions from @alexanderbez
alexanderbez Dec 14, 2018
5d033eb
Update rest.go
fedekunze Dec 14, 2018
d20d170
review fixes
Dec 14, 2018
1be6ade
rename flag '--fee' to '--fees'
Dec 14, 2018
b2190ff
Merge branch 'develop' into fedekunze/3067-fee-rest-txs
fedekunze Dec 14, 2018
525d290
merge develop
Dec 17, 2018
bc8b60f
pending update
Dec 17, 2018
655014c
Merge branch 'develop' into fedekunze/3067-fee-rest-txs
fedekunze Dec 18, 2018
d5785c0
Merge branch 'develop' into fedekunze/3067-fee-rest-txs
jackzampolin Dec 18, 2018
0fcc8b4
Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into f…
Dec 18, 2018
370ea59
fix tx builder
Dec 18, 2018
4dace37
Merge branch 'develop' into fedekunze/3067-fee-rest-txs
fedekunze Dec 18, 2018
c192cbc
update flag fee to fees
Dec 18, 2018
98797ab
Merge branch 'fedekunze/3067-fee-rest-txs' of https://github.com/cosm…
Dec 18, 2018
2809403
delete panics when no chain-id is provided
Dec 18, 2018
6e7db9d
make txBuilder's fields private
Dec 19, 2018
bc35c17
simulateAndExecute transaction
Dec 19, 2018
b376604
update swagger
Dec 19, 2018
0d4ee31
Update PENDING.md
fedekunze Dec 19, 2018
82dae0e
minor fix
Dec 19, 2018
93356dd
Merge branch 'fedekunze/3067-fee-rest-txs' of https://github.com/cosm…
Dec 19, 2018
c907f3b
Merge branch 'develop' into fedekunze/3067-fee-rest-txs
fedekunze Dec 19, 2018
cfa723a
Update sign.go
fedekunze Dec 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
BREAKING CHANGES

* Gaia REST API (`gaiacli advanced rest-server`)
* [gaia-lite] [\#2182] Renamed and merged all redelegations endpoints into `/stake/redelegations`
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like some of these additions don't belong here...possible from a bad merge/rebase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah it was from sunny's PR which had PENDING entries from other releases. Also that PR had breaking changes which weren't added (that's why I changed them here).

Already talked with @jackzampolin and he said it was fine to do this changes on the PENDING here


* Gaia CLI (`gaiacli`)
* [\#810](https://github.com/cosmos/cosmos-sdk/issues/810) Don't fallback to any default values for chain ID.
- Users need to supply chain ID either via config file or the `--chain-id` flag.
- Change `chain_id` and `trust_node` in `gaiacli` configuration to `chain-id` and `trust-node` respectively.
* Users need to supply chain ID either via config file or the `--chain-id` flag.
* Change `chain_id` and `trust_node` in `gaiacli` configuration to `chain-id` and `trust-node` respectively.
* [\#3069](https://github.com/cosmos/cosmos-sdk/pull/3069) `--fee` flag renamed to `--fees` to support multiple coins
* [\#3156](https://github.com/cosmos/cosmos-sdk/pull/3156) Remove unimplemented `gaiacli init` command

* Gaia
Expand All @@ -21,14 +23,13 @@ BREAKING CHANGES
FEATURES

* Gaia REST API (`gaiacli advanced rest-server`)
* [gaia-lite] [\#2182] Added LCD endpoint for querying redelegations
* [gov] [\#2479](https://github.com/cosmos/cosmos-sdk/issues/2479) Added governance parameter
query REST endpoints.
* [\#3067](https://github.com/cosmos/cosmos-sdk/issues/3067) Add support for fees on transactions
* [\#3069](https://github.com/cosmos/cosmos-sdk/pull/3069) Add a custom memo on transactions

* Gaia CLI (`gaiacli`)
* \#2399 Implement `params` command to query slashing parameters.

* Gaia

* [\#2182] [x/stake] Added querier for querying a single redelegation

* SDK
Expand Down
19 changes: 10 additions & 9 deletions client/flags.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package client

import (
"errors"
"fmt"
"strconv"

Expand Down Expand Up @@ -29,7 +30,7 @@ const (
FlagAccountNumber = "account-number"
FlagSequence = "sequence"
FlagMemo = "memo"
FlagFee = "fee"
FlagFees = "fees"
FlagAsync = "async"
FlagJson = "json"
FlagPrintResponse = "print-response"
Expand Down Expand Up @@ -78,7 +79,7 @@ func PostCommands(cmds ...*cobra.Command) []*cobra.Command {
c.Flags().Uint64(FlagAccountNumber, 0, "AccountNumber number to sign the tx")
c.Flags().Uint64(FlagSequence, 0, "Sequence number to sign the tx")
c.Flags().String(FlagMemo, "", "Memo to send along with transaction")
c.Flags().String(FlagFee, "", "Fee to pay along with transaction")
c.Flags().String(FlagFees, "", "Fees to pay along with transaction; eg: 10stake,1atom")
c.Flags().String(FlagChainID, "", "Chain ID of tendermint node")
c.Flags().String(FlagNode, "tcp://localhost:26657", "<host>:<port> to tendermint rpc interface for this chain")
c.Flags().Bool(FlagUseLedger, false, "Use a connected Ledger device")
Expand Down Expand Up @@ -135,7 +136,7 @@ func (v *GasSetting) Type() string { return "string" }

// Set parses and sets the value of the --gas flag.
func (v *GasSetting) Set(s string) (err error) {
v.Simulate, v.Gas, err = ReadGasFlag(s)
v.Simulate, v.Gas, err = ParseGas(s)
return
}

Expand All @@ -146,17 +147,17 @@ func (v *GasSetting) String() string {
return strconv.FormatUint(v.Gas, 10)
}

// ParseGasFlag parses the value of the --gas flag.
func ReadGasFlag(s string) (simulate bool, gas uint64, err error) {
switch s {
// ParseGas parses the value of the gas option.
func ParseGas(gasStr string) (simulateAndExecute bool, gas uint64, err error) {
switch gasStr {
case "":
gas = DefaultGasLimit
case GasFlagSimulate:
simulate = true
simulateAndExecute = true
default:
gas, err = strconv.ParseUint(s, 10, 64)
gas, err = strconv.ParseUint(gasStr, 10, 64)
if err != nil {
err = fmt.Errorf("gas must be either integer or %q", GasFlagSimulate)
err = errors.New("gas must be a positive integer")
return
}
}
Expand Down
Loading