Commit Graph

46 Commits

Author SHA1 Message Date
Jae Kwon
6325441861 txBld -> txBldr 2018-09-07 10:15:49 -07:00
Jae Kwon
acd125029d x/auth/client/context -> x/auth/client/txbuilder 2018-09-07 10:04:58 -07:00
Alessio Treglia
54b3b5c028
sed -i 's/txCtx/txBld/g' 2018-09-07 14:39:23 +01:00
Alessio Treglia
3b6da7af18
TxContext -> TxBuilder 2018-09-07 14:36:21 +01:00
Alessio Treglia
89b3ab9e51
Don't skip basic validation 2018-09-04 17:29:33 +02:00
Alessio Treglia
86395809cb
Implement generate-only option for commands that create txs
The new CLI flag builds an unsigned transaction and writes it to STDOUT.
Likewise, REST clients can now append generate_only=true to a request's
query arguments list and expect a JSON response carrying the unsigned
transaction.

Closes: #966
2018-09-04 02:32:05 +02:00
Alessio Treglia
122ed3a900
Don't use pointers when you need them not! 2018-08-31 19:04:45 +02:00
Alessio Treglia
1370ca611b
Set GasAdjustment in CLIContext when handling HTTP requests
This is to address @alexanderbez's comments
2018-08-31 19:04:42 +02:00
Alessio Treglia
599923fb99
Introduce simulate mode
Add a simulate only flag '--dry-run' to both CLI tx commands
and RESTful endpoints to trigger the simulation of unsigned
transactions.

* Turning --dry-run on causes the --gas flag to be ignored.
  The simulation will return the estimate of the gas required
  to actually run the transaction.
* Adjustment is no longer required. It now defaults to 1.0.
* In some test cases accounts retrieved from the state do not
  come with a PubKey. In such cases, a fake secp256k1 key is
  generated and gas consumption calculated accordingly.

Closes: #2110
2018-08-31 19:04:11 +02:00
Christopher Goes
d1ecc8f6b4
Merge PR #2141: Governance CLI uses Querier 2018-08-28 14:49:33 +02:00
Sunny Aggarwal
bfdeb3f8ce works 2018-08-27 15:18:01 -07:00
Sunny Aggarwal
6391611005 asdf 2018-08-24 11:07:53 -07:00
Alessio Treglia
7e8feec738
Incorporating @cwgoes comments 2018-08-24 15:20:53 +01:00
Alessio Treglia
f36f749818
Incorporating @ValarDragon's comments 2018-08-24 10:16:51 +01:00
Alessio Treglia
f432c0c383
Simulate transactions before actual execution
* Change --gas=0 semantic in order to enable gas auto estimate.
* REST clients have been modified to simulate the execution of
  the tx first to then populate the context with the estimated
  gas amount returned by the simulation.
* The simulation returns both an unadjusted gas estimate and an
  adjusted one. The adjustment is required to ensure that the
  ensuing execution doesn't fail due to state changes that might
  have occurred. Gas adjustment can be controlled via the CLI's
  --gas-adjustment flag.
* Tiny refactorig of REST endpoints error handling.

Closes: #1246
2018-08-24 10:16:51 +01:00
Christopher Goes
879f78cfc0 Rename revoke(d) to jail(ed) 2018-08-22 17:56:13 +02:00
Christopher Goes
b23fe15e4a
Merge PR #1918: Keeper custom queries & QueryRouter 2018-08-22 12:50:59 +02:00
Christopher Goes
4b5bb45a09
Merge PR #2062: Support a proposal JSON file in submit-proposal 2018-08-22 12:31:58 +02:00
Sunny Aggarwal
5ae20d2d51 address Chris's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal
0134c3b7f1 Address Anton's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal
1311117658 added to gov rest 2018-08-22 00:12:44 -07:00
Matthew Slipper
d8f01be211 Merge PR #2061: Change proposalID to proposal-id in gov REST
Close #1963.
2018-08-21 23:44:13 -04:00
Matthew Slipper
f7d8675234 Support a proposal JSON file in submit-proposal
Closes #1852.
Closes #1776.
2018-08-21 14:34:15 -07:00
Alexander Bezobchuk
12c2c236c2 Merge PR #1741: CoreContext Refactor 2018-08-06 20:11:30 +02:00
Sunny Aggarwal
d3fcfdba57 Merge PR #1845: Query-proposals CLI command 2018-07-31 01:48:00 +02:00
rigelrozanski
15138b80c8 Merge remote-tracking branch 'origin/develop' into sunny/gov-cli-proposal-id 2018-07-20 11:47:37 -04:00
Sunny Aggarwal
f3a12909ef Merge PR #1773: Query the votes on a proposal
* added lcd endpoint to query all votes on a proposal
* added cli support
* Gopkg.lock from new dep
* Update PENDING.md
2018-07-20 02:02:46 +02:00
Sunny Aggarwal
21e72d5f10 gov cli proposalID to proposal-id 2018-07-19 12:37:57 -07:00
Rigel
d2f70ec8af Merge PR #1748: CLI use --from consistently 2018-07-19 08:53:12 +02:00
Sunny Aggarwal
d6969c1d22 Merge PR #1697: Proposal Query filter by status 2018-07-17 22:59:06 +02:00
Dev Ojha
a2047c5c81 Merge PR #1687: tools: Ensure Gopkg.lock is correct in linting
* tools: Ensure Gopkg.lock is correct in linting

This adds dep status to the lint process. Also fixes linting errors
that existed earlier. (not sure why they didn't show up on CI)

Closes #1574

* Update dep, use the lock file new dep version creates
2018-07-14 23:48:41 +02:00
Sunny Aggarwal
cba7fd7ee8 gov enums marshal to String 2018-07-10 17:59:07 -07:00
Christopher Goes
5a56c3f03d
Merge PR #1575: ready-for-review: sdk.AccAddress natively bech32 2018-07-10 04:18:23 +02:00
ValarDragon
99e91dd276 Add nolints on remaining functions 2018-07-09 16:16:43 -07:00
Sunny Aggarwal
896cd333f0 address comments 2018-07-09 16:06:05 -07:00
sunnya97
7ac220beb6 asdf 2018-07-09 00:59:51 -07:00
Christopher Goes
86d7b8f981
Merge PR #1573: gov/client: rename submitproposal to submit-proposal 2018-07-06 08:02:59 +02:00
ValarDragon
12c1eb4d31 gov/client: rename submitproposal to submit-proposal
It is standard in the sdk to use a dash for subcommands / flags
with multiple words. This makes submitproposal comply with that.
2018-07-05 22:22:50 -07:00
ValarDragon
c708c799fd Add print-response flag 2018-07-05 22:19:50 -07:00
ValarDragon
8857b69d02 Use async flag directly from context 2018-07-05 20:15:40 -07:00
ValarDragon
27a31cae44 add Async to context 2018-07-05 20:05:17 -07:00
ValarDragon
6f94dd64c0 cli: Add async flag to all broadcasting txs
closes #1436
2018-07-05 19:15:37 -07:00
Dev Ojha
097dd8a164 tools: Add unparam linter (#1443)
* tools: Add unparam linter

unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.

There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.

* crypto/keys no longer used by x/gov/client/rest/rest.go
2018-06-29 18:22:24 -04:00
Christopher Goes
59aadf42aa
Ledger integration (#931)
Merges the keybase and Ledger code from go-crypto (which is no more) into the SDK
Adds support for Ledger into gaiacli
Cherry-picks updated error handling from #1158
2018-06-29 02:54:47 +02:00
Sunny Aggarwal
4effa6f8d4 Merge PR #1357: RESTful governance endpoints
* get deposit rest endpoint
* query proposals
* changelog
* fixed commented out headers
* fixed undeterministic tests
* increase circle test timeout
* MustBech32ifyAcc
* asdf
2018-06-28 01:49:59 +02:00
Sunny Aggarwal
dc2c8f900b Merge PR #1168: Governance MVP 2018-06-22 02:19:14 +02:00