Closed ethanfrey closed 7 years ago
Addresses issue #22
something like this...
# tmcli tx demo --age 13 --user john
ERROR: Sorry, dude, you're too young to blockchain!
# tmcli tx demo --age 20 --user john
{
"check_tx": {
"code": 102,
"data": "",
"log": "Error (base) encoding error;Error decoding tx: EOF"
},
"deliver_tx": {
"code": 0,
"data": "",
"log": ""
},
"hash": "A610D9CAF21B5D660F5879C37FE5F579969D40A4",
"height": 0
}
or with json input file:
# echo '{ "user": "bill", "age": 11}' > tx.json
# tmcli tx demo --input tx.json
ERROR: Sorry, dude, you're too young to blockchain!
#echo '{ "user": "bill", "age": 22}' > tx.json
# tmcli tx demo --input tx.json
{
"check_tx": {
"code": 102,
"data": "",
"log": "Error (base) encoding error;Error decoding tx: EOF"
},
"deliver_tx": {
"code": 0,
"data": "",
"log": ""
},
"hash": "07793FAFBEBF89F784DA14BB01122423FC7C3287",
"height": 0
}
And left to the reader... verify that the returned tx hash for tmcli tx demo --age 22 --user bill
is the same as from the json version...
Of course, I was pushing garbage to the testnet... but it proves the code doesn't panic and actually posted binary data to the testnet.
Yeah, let's clean this up a bit, and I will post the basecoin tx nonsense to this format