Commit Graph

69 Commits

Author SHA1 Message Date
Emmanuel Odeke f52d92a40e modules/coin/rest: implemented CreateRole
* Note: Role must be a hex string, as enforced in tests/rest/cli.sh

```shell
$ curl -X POST http://localhost:8998/build/create_role --data \
'{
  "role":"DEADBEEF", "seq": 1,
  "min_sigs": 1,
  "signers": [{
    "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9", "app": "role"
  }]
}'
```

```HTTP
HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 08 Aug 2017 19:15:13 GMT
Content-Length: 387

{
  "type": "chain/tx",
  "data": {
    "chain_id": "test_chain_id",
    "expires_at": 0,
    "tx": {
      "type": "role/create",
      "data": {
        "role": "DEADBEEF",
        "min_sigs": 1,
        "signers": [
          {
            "chain": "",
            "app": "role",
            "addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9"
          }
        ]
      }
    }
  }
}
```

Updates #200
2017-08-18 22:32:04 +01:00
Ethan Frey d6d6b75736 Renamed client/commands/proofs to client/commands/query 2017-08-04 20:50:36 +02:00
Alexis Sellier 831c9ae3ec Use Get/GetParsed everywhere 2017-08-04 19:21:40 +02:00
Ethan Frey 640f06998a Moved all gas and payment values to uint64 to make sure we are safe here 2017-08-04 14:11:01 +02:00
Ethan Frey 74070f1cac Add module tests for checktx return values 2017-08-03 21:41:24 +02:00
Ethan Frey 1715c0aeba Handlers and middlewares add gas prices 2017-08-03 21:41:24 +02:00
Ethan Frey 37550ca91d Add InitValidate method for setup 2017-08-03 21:41:23 +02:00
Ethan Frey 4b69f1d5ba Rename SetOption to InitState 2017-08-03 21:41:23 +02:00
Ethan Frey cbfd2cd611 Make it all compile with new Deliver/CheckTx 2017-08-03 21:41:23 +02:00
Emmanuel Odeke ee5d22010a
cmd/baseserver, */rest: allow baseserver to choose which handlers to use
Make handlers easily configurable to use in cmd/baseserver/main.go.
This way client users can trivially change what functionality they'd
like.
It involves moving ServeCmd out of client/rest to */main.go
and lets client/rest become a bazaar for available mux.Router
registrars.

Updates #200
2017-08-03 11:41:51 -06:00
Emmanuel Odeke 1a45755027 client/rest, modules/coin/rest: moved code around
After offline emails and a video call with @ethanfrey,
a goal was decided to move things around i.e:
- [X] Move /build/send and /query/account to modules/coin/rest

Due to that move, there is a lot of overlap between needed
code and utils so extracted common code to make
https://github.com/tendermint/tmlibs/pull/33
so make sure to pull in that commit into your tmlibs tree.

After code review feedback:
client/rest, modules/coin/rest: FoutputProof, PrepareSendTx helper

* Extract OutputProof to FoutputProof helper that can
be used in modules/coin/rest/handlers.go as proofs.FoutputProof
* Revert r.HandleFunc("/tx", doPostTx).Methods("POST") which
was erraneously deleted
* Use function signatures from "tendermint/tmblibs/common"
2017-08-02 12:57:29 -06:00
Ethan Frey 6632d88b3d IBC post packet test passes 2017-07-27 16:41:37 -04:00
Ethan Frey b7abee64f0 Test creating packet and query via cli 2017-07-27 16:41:12 -04:00
Ethan Frey 9640547c01 Expose credit tx to cli and test 2017-07-27 16:41:12 -04:00
Ethan Frey 3027eeb3c3 Add CreditTx and tests 2017-07-27 16:41:12 -04:00
Ethan Frey 6135345af8 Add issuer position to grant credit 2017-07-27 16:36:47 -04:00
Ethan Frey b7f31ad70a Test sendtx with foreign addr creates proper ibc packet 2017-07-27 16:36:15 -04:00
Ethan Frey 746ae28eaa Add ibc query commands 2017-07-27 16:27:06 -04:00
Ethan Frey 374f078b79 IBC test just rawtx, coin ibc in that module 2017-07-27 16:27:06 -04:00
Ethan Frey 0c5f0bdf77 Test outgoing ibc packets add to the chain credit properly 2017-07-27 16:27:06 -04:00
Ethan Frey 555e0d8ec8 test receiving and verifying incoming ibc packets 2017-07-27 16:26:00 -04:00
Ethan Frey 9b099a2f36 Fix up ibc to work with new cli reorg 2017-07-27 16:25:05 -04:00
Ethan Frey 27e7fbe4cf Last cleanup 2017-07-27 15:31:34 -04:00
Ethan Frey 51a29e4bb7 Ported everything to SimpleDB interface 2017-07-27 15:31:33 -04:00
Ethan Frey 9cf0f257c0 Add benchmark for abci app 2017-07-25 10:06:07 -04:00
Ethan Frey 63fc25e74e Add roles cli test, coin query supports multiple apps in actor 2017-07-19 16:14:26 +02:00
Ethan Frey 911dd1423e Add roles wrapper/tx/query command to basecoin 2017-07-19 14:26:40 +02:00
Ethan Frey e7da4c2d3a Add support for --prepare to store tx for multisig 2017-07-19 13:22:53 +02:00
rigel rozanski ac1ecc10c4 new library orders 2017-07-19 04:51:36 -04:00
rigel rozanski 8617841296 errors cleanup 2017-07-19 01:23:13 -04:00
rigel rozanski 0a9460dc93 auto-sequencing 2017-07-19 00:13:39 -04:00
Ethan Frey 100522069d Moved cmd/basecli/commands into client/commands 2017-07-18 22:21:57 +02:00
Ethan Frey eb495e081b Move commands to client/commands 2017-07-18 21:57:37 +02:00
Ethan Frey a9e4a94402 Moved all commands from light-client into basecoin 2017-07-18 21:23:11 +02:00
Ethan Frey a060bde1c4 Add more flags to help with multisig 2017-07-18 20:45:48 +02:00
Ethan Frey 7b0934bf9f Ripped about cmd logic to make middleware modular 2017-07-18 20:12:51 +02:00
rigel rozanski 16b039534d working sequence number with errors 2017-07-18 12:08:28 +02:00
Ethan Frey 137f8a9ce1 Remove all sequence from coin, fixed cli tests 2017-07-12 19:25:15 +02:00
Ethan Frey 5950ff34e3 remove sequence number from coins 2017-07-12 19:25:14 +02:00
Ethan Frey 771c08483e Remove prefix space in modules, done with state space 2017-07-11 15:11:10 +02:00
Ethan Frey fbdec34ea6 fix typo 2017-07-11 13:56:39 +02:00
Ethan Frey 11a8c0d9a2 Add roles middleware and handler 2017-07-11 13:55:28 +02:00
Ethan Frey 9eb3c3c7de Start specifying the roles module 2017-07-11 13:53:05 +02:00
Ethan Frey b6197a1c12 Add height to context, cleanup, add to app and stack 2017-07-10 12:19:42 +02:00
rigel rozanski 82c0f98235 more golint updating 2017-07-06 23:37:45 -04:00
Ethan Frey 58bc1e3cf8 Simple coin benchmark with memkvstore 2017-07-06 17:07:40 +02:00
Ethan Frey a047e210fa Moved the handlers from stack into modules 2017-07-06 16:00:54 +02:00
Ethan Frey 6983f61961 Moved Coins from types -> modules/coin 2017-07-06 14:59:45 +02:00
Ethan Frey 49357a3574 Move kvstore from types to state 2017-07-06 14:23:38 +02:00
Ethan Frey 912c24093f Removed a whole lot of old crud 2017-07-06 13:40:02 +02:00