Commit Graph

57 Commits

Author SHA1 Message Date
Federico Kunze
ad355d6c69 Merge PR #2444: Standardize REST error responses 2018-10-19 18:55:20 +02:00
Federico Kunze
8e1d0fbac0 Add option to indent response 2018-10-15 10:41:37 +02:00
Federico Kunze
b1109180ca add header 2018-10-12 19:12:57 -07:00
Federico Kunze
f8486aeca5 Add deposits endpoint and tests 2018-10-12 19:05:22 -07:00
Alessio Treglia
0f4a03b44e Alessio/server refactor (#2472)
* Add arg to PrintUnsignedStdTx() to actually operate in offline mode
* WIP simplifying server module
* Expose ExternalIP()
* Move {GenTx,Init}Cmd into gaia's new init package
2018-10-10 15:45:41 -07:00
Jae Kwon
1e26ba2e0e
CLIContext.Logger -> .Output as it isn't a logger (#2420)
This changes .Logger to .Output, as it isn't used anywhere except as os.Stdout.
2018-09-28 21:45:54 -07:00
Alessio Treglia
a2caefc8ae Merge PR #2390: CLI subcommands reorganization 2018-09-26 22:00:49 +08:00
Alexander Bezobchuk
91cac96fea Merge PR #2391: LCD Cleanup and DRY Refactor 2018-09-26 21:29:39 +08:00
Alexander Bezobchuk
611e287375 Merge PR #2401: Remove remnants of gocyclo 2018-09-25 13:45:04 -04:00
Dev Ojha
6b55093c75 Merge PR #2324: rename wire to codec
* rename wire to codec

* fix formatting and cli

* fix the docs
2018-09-13 14:17:32 -04:00
Alessio Treglia
fb0cc0b078 Merge PR #2306: Change --gas=0 semantic and introduce --gas=simulate
* Change --gas=0 semantic and introduce --gas=simulate

Make --gas flag accept a conventional "simulate" string value in addition
to integers. Passing --gas=simulate would trigger the tx simulation and
set the gas according to the gas estimate returned by the simulation.
Any other integer value passed to --gas would be interpreted as-is and
and set as gas wanted value.

Closes: #2300

* Add test cases with gas=0

* ACK suggestion from @alexanderbez

* s/GasFlagSimulateString/GasFlagSimulate/

* Drop TODO comment on Gas type

* Enrich TODO with ref
2018-09-11 20:31:30 -04:00
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