From 6601082283757f29320e9bfd720701448cb76cb5 Mon Sep 17 00:00:00 2001 From: Carlos Medeiros Date: Mon, 15 Apr 2024 14:25:17 +0100 Subject: [PATCH] wip --- app/src/apdu_handler.c | 1 + app/src/parser.c | 1 + tests/testcases/manual.json | 4458 ++++++++--------- tests/ui_tests.cpp | 16 +- tests_zemu/tests/amino.test.ts | 821 +-- tests_zemu/tests/common.ts | 47 +- .../{standard.test.ts => standard.test.ts_} | 0 .../{textual.test.ts => textual.test.ts_} | 0 8 files changed, 2694 insertions(+), 2650 deletions(-) rename tests_zemu/tests/{standard.test.ts => standard.test.ts_} (100%) rename tests_zemu/tests/{textual.test.ts => textual.test.ts_} (100%) diff --git a/app/src/apdu_handler.c b/app/src/apdu_handler.c index 18ca7d10..742fcc04 100644 --- a/app/src/apdu_handler.c +++ b/app/src/apdu_handler.c @@ -205,6 +205,7 @@ __Z_INLINE void handleSign(volatile uint32_t *flags, volatile uint32_t *tx, uint parser_tx_obj.tx_json.own_addr = (const char *) (G_io_apdu_buffer + VIEW_ADDRESS_OFFSET_SECP256K1); const char *error_msg = tx_parse(sign_type); + zemu_log_stack("carlos-out of parser"); if (error_msg != NULL) { const int error_msg_length = strnlen(error_msg, sizeof(G_io_apdu_buffer)); MEMCPY(G_io_apdu_buffer, error_msg, error_msg_length); diff --git a/app/src/parser.c b/app/src/parser.c index f0192bf9..333670e5 100644 --- a/app/src/parser.c +++ b/app/src/parser.c @@ -55,6 +55,7 @@ parser_error_t parser_parse(parser_context_t *ctx, if (tx_obj->tx_type == tx_textual) { CHECK_PARSER_ERR(_read_text_tx(ctx, tx_obj)) } else { + zemu_log_stack("carlos-in json parser"); CHECK_PARSER_ERR(_read_json_tx(ctx, tx_obj)) } diff --git a/tests/testcases/manual.json b/tests/testcases/manual.json index b7d00e03..02d416ed 100644 --- a/tests/testcases/manual.json +++ b/tests/testcases/manual.json @@ -1,12 +1,12 @@ [ - { - "name": "empty", - "tx": "", - "parsingErr": "No error", - "validationErr": "JSON Missing chain_id", - "expected": [], - "expert": true - }, + // { + // "name": "empty", + // "tx": "", + // "parsingErr": "No error", + // "validationErr": "JSON Missing chain_id", + // "expected": [], + // "expert": true + // }, { "name": "minimal", "tx": { @@ -41,2229 +41,2229 @@ "5 | Gas : V3" ], "expert": true - }, - { - "name": "multipleMessages", - "tx": { - "account_number": "V1", - "chain_id": "V2", - "fee": { - "amount": [ - { - "amount": "b", - "denom": "d" - } - ], - "gas": "V3" - }, - "memo": "V4", - "msgs": [ - { - "m1": "z1" - }, - { - "m2": "z2" - }, - { - "m3": "z3" - } - ], - "sequence": "V5" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : V2", - "1 | Account : V1", - "2 | Sequence : V5", - "3 | msgs/m1 : z1", - "4 | msgs/m2 : z2", - "5 | msgs/m3 : z3", - "6 | Memo : V4", - "7 | Fee : b d", - "8 | Gas : V3" - ], - "expert": true - }, - { - "name": "completeTransferExpert", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "4 | Source Coins : 10 atom", - "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "6 | Dest Coins : 10 atom", - "7 | Memo : testmemo", - "8 | Fee : 5 photon", - "9 | Gas : 10000" - ], - "expert": true - }, - { - "name": "completeTransfer", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "1 | Source Coins : 10 atom", - "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "3 | Dest Coins : 10 atom", - "4 | Memo : testmemo", - "5 | Fee : 5 photon" - ], - "expert": false - }, - { - "name": "completeTransferNoMemoExpert", - "tx": { - "account_number": "0", - "chain_id": "test-chain-1", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "JSON Missing memo", - "expected": [ - "0 | Chain ID : test-chain-1", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "4 | Source Coins : 10 atom", - "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "6 | Dest Coins : 10 atom", - "7 | Fee : 5 photon", - "8 | Gas : 10000" - ], - "expert": true - }, - { - "name": "completeTransferNoMemo", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "JSON Missing memo", - "expected": [ - "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "1 | Source Coins : 10 atom", - "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "3 | Dest Coins : 10 atom", - "4 | Fee : 5 photon" - ], - "expert": false - }, - { - "name": "completeTransferEmptyMemoExpert", - "tx": { - "account_number": "0", - "chain_id": "test-chain-1", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : test-chain-1", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "4 | Source Coins : 10 atom", - "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "6 | Dest Coins : 10 atom", - "7 | Fee : 5 photon", - "8 | Gas : 10000" - ], - "expert": true - }, - { - "name": "completeTransferEmptyMemo", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "1 | Source Coins : 10 atom", - "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "3 | Dest Coins : 10 atom", - "4 | Fee : 5 photon" - ], - "expert": false - }, - { - "name": "multipleTransfersExpert", - "tx": { - "account_number": "0", - "chain_id": "test-chain-1", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - }, - { - "inputs": [ - { - "address": "test2", - "coins": [ - { - "amount": "20", - "denom": "bitcoin" - } - ] - } - ], - "outputs": [ - { - "address": "test3", - "coins": [ - { - "amount": "50", - "denom": "ripple" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : test-chain-1", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "4 | Source Coins : 10 atom", - "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "6 | Dest Coins : 10 atom", - "7 | Source Address : test2", - "8 | Source Coins : 20 bitcoin", - "9 | Dest Address : test3", - "10 | Dest Coins : 50 ripple", - "11 | Memo : testmemo", - "12 | Fee : 5 photon", - "13 | Gas : 10000" - ], - "expert": true - }, - { - "name": "multipleTransfers", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - }, - { - "inputs": [ - { - "address": "test2", - "coins": [ - { - "amount": "20", - "denom": "bitcoin" - } - ] - } - ], - "outputs": [ - { - "address": "test3", - "coins": [ - { - "amount": "50", - "denom": "ripple" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "1 | Source Coins : 10 atom", - "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "3 | Dest Coins : 10 atom", - "4 | Source Address : test2", - "5 | Source Coins : 20 bitcoin", - "6 | Dest Address : test3", - "7 | Dest Coins : 50 ripple", - "8 | Memo : testmemo", - "9 | Fee : 5 photon" - ], - "expert": false - }, - { - "name": "delegationExpert", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Zondax.ch", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 6571", - "2 | Sequence : 1", - "3 | Type : Delegate", - "4 | Amount : 1000000 uatom", - "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "5 | Delegator [2/2] : 3vwtpl", - "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "6 | Validator [2/2] : 9m5s03xfytvz7", - "7 | Memo : Zondax.ch", - "8 | Fee : 5000 uatom", - "9 | Gas : 200000" - ], - "expert": true - }, - { - "name": "delegationDifferentChain", - "tx": { - "account_number": "6571", - "chain_id": "otherhub", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Zondax.ch", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : otherhub", - "1 | Account : 6571", - "2 | Sequence : 1", - "3 | Type : Delegate", - "4 | Amount : 1000000 uatom", - "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "5 | Delegator [2/2] : 3vwtpl", - "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "6 | Validator [2/2] : 9m5s03xfytvz7", - "7 | Memo : Zondax.ch", - "8 | Fee : 5000 uatom", - "9 | Gas : 200000" - ], - "expert": false - }, - { - "name": "delegation", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Zondax.ch", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Type : Delegate", - "1 | Amount : 1.000000 ATOM", - "2 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "2 | Delegator [2/2] : 3vwtpl", - "3 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "3 | Validator [2/2] : 9m5s03xfytvz7", - "4 | Memo : Zondax.ch", - "5 | Fee : 0.005000 ATOM" - ], - "expert": false - }, - { - "name": "proposalExpert", - "tx": { - "account_number": "2", - "chain_id": "local-testnet", - "fee": { - "amount": [], - "gas": "500000" - }, - "memo": "abc", - "msgs": [ - { - "description": "test", - "initial_deposit": [ - { - "amount": "1", - "denom": "stake" - } - ], - "proposal_type": "Text", - "proposer": "cosmos101234567890abcdefghijklmnopqrstuvwxyz0", - "title": "test" - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : local-testnet", - "1 | Account : 2", - "2 | Sequence : 0", - "3 | msgs/description : test", - "4 | msgs/initial_deposit/amount : 1", - "5 | msgs/initial_deposit/denom : stake", - "6 | msgs/proposal_type : Text", - "7 | msgs/proposer [1/2] : cosmos101234567890abcdefghijklmnopqrstu", - "7 | msgs/proposer [2/2] : vwxyz0", - "8 | msgs/title : test", - "9 | Memo : abc", - "10 | Fee : Empty", - "11 | Gas : 500000" - ], - "expert": true - }, - { - "name": "proposal", - "tx": { - "account_number": "2", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [], - "gas": "500000" - }, - "memo": "abc", - "msgs": [ - { - "description": "test", - "initial_deposit": [ - { - "amount": "1", - "denom": "stake" - } - ], - "proposal_type": "Text", - "proposer": "cosmos101234567890abcdefghijklmnopqrstuvwxyz0", - "title": "test" - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | msgs/description : test", - "1 | msgs/initial_deposit/amount : 1", - "2 | msgs/initial_deposit/denom : stake", - "3 | msgs/proposal_type : Text", - "4 | msgs/proposer [1/2] : cosmos101234567890abcdefghijklmnopqrstu", - "4 | msgs/proposer [2/2] : vwxyz0", - "5 | msgs/title : test", - "6 | Memo : abc", - "7 | Fee : Empty" - ], - "expert": false - }, - { - "name": "delegation2Expert", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Delegated with Ledger from union.market", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 6571", - "2 | Sequence : 0", - "3 | Type : Delegate", - "4 | Amount : 1000000 uatom", - "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "5 | Delegator [2/2] : 3vwtpl", - "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "6 | Validator [2/2] : 9m5s03xfytvz7", - "7 | Memo : Delegated with Ledger from union.market", - "8 | Fee : 5000 uatom", - "9 | Gas : 200000" - ], - "expert": true - }, - { - "name": "delegation2", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Delegated with Ledger from union.market", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Type : Delegate", - "1 | Amount : 1.000000 ATOM", - "2 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "2 | Delegator [2/2] : 3vwtpl", - "3 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "3 | Validator [2/2] : 9m5s03xfytvz7", - "4 | Memo : Delegated with Ledger from union.market", - "5 | Fee : 0.005000 ATOM" - ], - "expert": false - }, - { - "name": "badcase", - "tx": { - "chain_id": "1234567890AB", - "fee": "1234" - }, - "parsingErr": "No error", - "validationErr": "JSON Missing sequence", - "expected": [ - "0 | Chain ID : 1234567890AB", - "1 | fee : 1234" - ], - "expert": true - }, - { - "name": "badcase2", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Delegated with Ledger from union.market", - "msgs": [ - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "amount": { - "amount": "1000000", - "denom": "uatom" - }, - "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 6571", - "2 | Sequence : 0", - "3 | Type : Delegate", - "4 | Amount : 1000000 uatom", - "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", - "5 | Delegator [2/2] : 3vwtpl", - "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "6 | Validator [2/2] : 9m5s03xfytvz7", - "7 | Memo : Delegated with Ledger from union.market", - "8 | Fee : 5000 uatom", - "9 | Gas : 200000" - ], - "expert": true - }, - { - "name": "oldStackOverflow", - "tx": { - "1": [ - [ - [ - [ - [ - [ - [ - [ - [ - [ - [ - [ - { - "2": "4" - } - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - }, - "parsingErr": "No error", - "validationErr": "JSON Missing chain_id", - "expected": [ - ], - "expert": true - }, - { - "name": "groupingSmallExpert", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 108", - "2 | Sequence : 106", - "3 | Type : Withdraw Reward", - "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "4 | Delegator [2/2] : hgqhwh", - "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", - "5 | Validator [2/2] : vjhennyh568ys", - "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "6 | Delegator [2/2] : hgqhwh", - "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", - "7 | Validator [2/2] : cyz7m0mahdv3p", - "8 | Fee : 600 uatom", - "9 | Gas : 200000" - ], - "expert": true - }, - { - "name": "groupingSmall", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Type : Withdraw Reward", - "1 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "1 | Delegator [2/2] : hgqhwh", - "2 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", - "2 | Validator [2/2] : vjhennyh568ys", - "3 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", - "3 | Validator [2/2] : cyz7m0mahdv3p", - "4 | Fee : 0.000600 ATOM" - ], - "expert": false - }, - { - "name": "groupingExpert", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc693ky4t3y2n2ku" - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 108", - "2 | Sequence : 106", - "3 | Type : Withdraw Reward", - "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "4 | Delegator [2/2] : hgqhwh", - "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", - "5 | Validator [2/2] : vjhennyh568ys", - "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "6 | Delegator [2/2] : hgqhwh", - "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", - "7 | Validator [2/2] : cyz7m0mahdv3p", - "8 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "8 | Delegator [2/2] : hgqhwh", - "9 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "9 | Validator [2/2] : 9m5s03xfytvz7", - "10 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "10 | Delegator [2/2] : hgqhwh", - "11 | Validator [1/2] : cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc6", - "11 | Validator [2/2] : 93ky4t3y2n2ku", - "12 | Fee : 600 uatom", - "13 | Gas : 200000" - ], - "expert": true - }, - { - "name": "grouping_ledger_testcase", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", - "validator_address": "cosmosvaloper1kn3wugetjuy4zetlq6wadchfhvu3x740ae6z6x" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", - "validator_address": "cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", - "validator_address": "cosmosvaloper1ey69r37gfxvxg62sh4r0ktpuc46pzjrm873ae8" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", - "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6" - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 108", - "2 | Sequence : 106", - "3 | Type : Withdraw Reward", - "4 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", - "4 | Delegator [2/2] : 7jycah", - "5 | Validator [1/2] : cosmosvaloper1kn3wugetjuy4zetlq6wadchfh", - "5 | Validator [2/2] : vu3x740ae6z6x", - "6 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", - "6 | Delegator [2/2] : 7jycah", - "7 | Validator [1/2] : cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc", - "7 | Validator [2/2] : 4n4ef9u2lcnj0", - "8 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", - "8 | Delegator [2/2] : 7jycah", - "9 | Validator [1/2] : cosmosvaloper1ey69r37gfxvxg62sh4r0ktpuc", - "9 | Validator [2/2] : 46pzjrm873ae8", - "10 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", - "10 | Delegator [2/2] : 7jycah", - "11 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", - "11 | Validator [2/2] : 542junl7rsvq6", - "12 | Fee : 600 uatom", - "13 | Gas : 200000" - ], - "expert": true - }, - { - "name": "massive", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc693ky4t3y2n2ku" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1wdrypwex63geqswmcy5qynv4w3z3dyef2qmyna" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper102ruvpv2srmunfffxavttxnhezln6fnc54at8c" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper10e4vsut6suau8tk9m6dnrm0slgd6npe3jx5xpv" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1ssm0d433seakyak8kcf93yefhknjleeds4y3em" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper13sduv92y3xdhy3rpmhakrc3v7t37e7ps9l0kpv" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper15urq2dtp9qce4fyc85m6upwm9xul3049e02707" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper14kn0kk33szpwus9nh8n87fjel8djx0y070ymmj" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper14lultfckehtszvzw4ehu0apvsr77afvyju5zzy" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1k9a0cs97vul8w2vwknlfmpez6prv8klv03lv3d" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1kj0h4kn4z5xvedu2nd9c4a9a559wvpuvu0h6qn" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", - "validator_address": "cosmosvaloper1hjct6q7npsspsg3dgvzk3sdf89spmlpfdn6m9d" - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 108", - "2 | Sequence : 106", - "3 | Type : Withdraw Reward", - "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "4 | Delegator [2/2] : hgqhwh", - "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", - "5 | Validator [2/2] : vjhennyh568ys", - "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "6 | Delegator [2/2] : hgqhwh", - "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", - "7 | Validator [2/2] : cyz7m0mahdv3p", - "8 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "8 | Delegator [2/2] : hgqhwh", - "9 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "9 | Validator [2/2] : 9m5s03xfytvz7", - "10 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "10 | Delegator [2/2] : hgqhwh", - "11 | Validator [1/2] : cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc6", - "11 | Validator [2/2] : 93ky4t3y2n2ku", - "12 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "12 | Delegator [2/2] : hgqhwh", - "13 | Validator [1/2] : cosmosvaloper1wdrypwex63geqswmcy5qynv4w", - "13 | Validator [2/2] : 3z3dyef2qmyna", - "14 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "14 | Delegator [2/2] : hgqhwh", - "15 | Validator [1/2] : cosmosvaloper102ruvpv2srmunfffxavttxnhe", - "15 | Validator [2/2] : zln6fnc54at8c", - "16 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "16 | Delegator [2/2] : hgqhwh", - "17 | Validator [1/2] : cosmosvaloper10e4vsut6suau8tk9m6dnrm0sl", - "17 | Validator [2/2] : gd6npe3jx5xpv", - "18 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "18 | Delegator [2/2] : hgqhwh", - "19 | Validator [1/2] : cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkf", - "19 | Validator [2/2] : v8z992ax69k08", - "20 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "20 | Delegator [2/2] : hgqhwh", - "21 | Validator [1/2] : cosmosvaloper1ssm0d433seakyak8kcf93yefh", - "21 | Validator [2/2] : knjleeds4y3em", - "22 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "22 | Delegator [2/2] : hgqhwh", - "23 | Validator [1/2] : cosmosvaloper13sduv92y3xdhy3rpmhakrc3v7", - "23 | Validator [2/2] : t37e7ps9l0kpv", - "24 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "24 | Delegator [2/2] : hgqhwh", - "25 | Validator [1/2] : cosmosvaloper15urq2dtp9qce4fyc85m6upwm9", - "25 | Validator [2/2] : xul3049e02707", - "26 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "26 | Delegator [2/2] : hgqhwh", - "27 | Validator [1/2] : cosmosvaloper14kn0kk33szpwus9nh8n87fjel", - "27 | Validator [2/2] : 8djx0y070ymmj", - "28 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "28 | Delegator [2/2] : hgqhwh", - "29 | Validator [1/2] : cosmosvaloper14lultfckehtszvzw4ehu0apvs", - "29 | Validator [2/2] : r77afvyju5zzy", - "30 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "30 | Delegator [2/2] : hgqhwh", - "31 | Validator [1/2] : cosmosvaloper1k9a0cs97vul8w2vwknlfmpez6", - "31 | Validator [2/2] : prv8klv03lv3d", - "32 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "32 | Delegator [2/2] : hgqhwh", - "33 | Validator [1/2] : cosmosvaloper1kj0h4kn4z5xvedu2nd9c4a9a5", - "33 | Validator [2/2] : 59wvpuvu0h6qn", - "34 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", - "34 | Delegator [2/2] : hgqhwh", - "35 | Validator [1/2] : cosmosvaloper1hjct6q7npsspsg3dgvzk3sdf8", - "35 | Validator [2/2] : 9spmlpfdn6m9d", - "36 | Fee : 600 uatom", - "37 | Gas : 200000" - ], - "expert": true - }, - { - "name": "combined", - "tx": { - "account_number": "108", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "600", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos19umvgcvk8cxsvzemy239nj9ngc2ltukantgyp3", - "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6" - } - }, - { - "type": "cosmos-sdk/MsgDelegate", - "value": { - "delegator_address": "cosmos19umvgcvk8cxsvzemy239nj9ngc2ltukantgyp3", - "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6", - "amount": { - "denom": "uatom", - "amount": "20139397" - } - } - } - ], - "sequence": "106" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Type : Withdraw Reward", - "1 | Delegator [1/2] : cosmos19umvgcvk8cxsvzemy239nj9ngc2ltuka", - "1 | Delegator [2/2] : ntgyp3", - "2 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", - "2 | Validator [2/2] : 542junl7rsvq6", - "3 | Type : Delegate", - "4 | Amount : 20.139397 ATOM", - "5 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", - "5 | Validator [2/2] : 542junl7rsvq6", - "6 | Fee : 0.000600 ATOM" - ], - "expert": false - }, - { - "name": "completeTransferWithTips", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "feecoin1" - }, - { - "amount": "6", - "denom": "feecoin2" - } - ], - "gas": "10000", - "granter": "cosmosaccaddr1d9h8xxxGRANTER", - "payer": "cosmosaccaddr1d9h8qatxxPAYER" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qatxxINPUT", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hguxxOUTPUT", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1", - "tip": { - "amount": [ - { - "amount": "65", - "denom": "tipcoin" - }, - { - "amount": "66", - "denom": "tipcoin2" - } - ], - "tipper": "cosmosaccaddr1d9h8qatxTIPPER" - } - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qatxxINPUT", - "4 | Source Coins : 10 atom", - "5 | Dest Address : cosmosaccaddr1da6hguxxOUTPUT", - "6 | Dest Coins : 10 atom", - "7 | Memo : testmemo", - "8 | Fee [1/2] : 5 feecoin1", - "8 | Fee [2/2] : 6 feecoin2", - "9 | Gas : 10000", - "10 | Granter : cosmosaccaddr1d9h8xxxGRANTER", - "11 | Payer : cosmosaccaddr1d9h8qatxxPAYER", - "12 | Tip [1/2] : 65 tipcoin", - "12 | Tip [2/2] : 66 tipcoin2", - "13 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" - ], - "expert": true - }, - { - "name": "completeTransferWithTipsBasic", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "photon" - } - ], - "gas": "10000", - "granter": "cosmosaccaddr1d9h8xxxGRANTER", - "payer": "cosmosaccaddr1d9h8qatxxPAYER" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qatxxINPUT", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hguxxOUTPUT", - "coins": [ - { - "amount": "10", - "denom": "atom" - } - ] - } - ] - } - ], - "sequence": "1", - "tip": { - "amount": [ - { - "amount": "65", - "denom": "tipcoin" - }, - { - "amount": "66", - "denom": "tipcoin2" - } - ], - "tipper": "cosmosaccaddr1d9h8qatxTIPPER" - } - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Source Address : cosmosaccaddr1d9h8qatxxINPUT", - "1 | Source Coins : 10 atom", - "2 | Dest Address : cosmosaccaddr1da6hguxxOUTPUT", - "3 | Dest Coins : 10 atom", - "4 | Memo : testmemo", - "5 | Fee : 5 photon", - "6 | Tip [1/2] : 65 tipcoin", - "6 | Tip [2/2] : 66 tipcoin2", - "7 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" - ], - "expert": false - }, - { - "name": "doubleFees", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "feecoin1" - }, - { - "amount": "6", - "denom": "feecoin2" - } - ], - "gas": "10000", - "granter": "cosmosaccaddr1d9h8xxxGRANTER", - "payer": "cosmosaccaddr1d9h8qatxxPAYER" - }, - "memo": "", - "msgs": [], - "sequence": "1", - "tip": { - "amount": [ - { - "amount": "65", - "denom": "tipcoin" - }, - { - "amount": "66", - "denom": "tipcoin2" - } - ], - "tipper": "cosmosaccaddr1d9h8qatxTIPPER" - } - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Fee [1/2] : 5 feecoin1", - "3 | Fee [2/2] : 6 feecoin2", - "4 | Gas : 10000", - "5 | Granter : cosmosaccaddr1d9h8xxxGRANTER", - "6 | Payer : cosmosaccaddr1d9h8qatxxPAYER", - "7 | Tip [1/2] : 65 tipcoin", - "7 | Tip [2/2] : 66 tipcoin2", - "8 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" - ], - "expert": true - }, - { - "name": "MsgWithdrawValidatorCommission", - "tx": { - "account_number": "6571", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "Zondax.ch", - "msgs": [ - { - "type": "cosmos-sdk/MsgWithdrawValidatorCommission", - "value": { - "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" - } - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Type : Withdraw Val. Commission", - "1 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", - "1 | Validator [2/2] : 9m5s03xfytvz7", - "2 | Memo : Zondax.ch", - "3 | Fee : 0.005000 ATOM" - ], - "expert": false - }, - { - "name": "MsgMultiSend", - "tx": { - "account_number": "8", - "chain_id": "testing", - "fee": { - "amount": [ - { - "amount": "0", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgMultiSend", - "value": { - "inputs": [ - { - "address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", - "coins": [ - { - "amount": "101000", - "denom": "uatom" - } - ] - } - ], - "outputs": [ - { - "address": "cosmos13dr26wdygna3s8fdl5tlc45m2le2ydydgjk8ek", - "coins": [ - { - "amount": "1000", - "denom": "uatom" - } - ] - }, - { - "address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", - "coins": [ - { - "amount": "100000", - "denom": "uatom" - } - ] - } - ] - } - } - ], - "sequence": "0" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : testing", - "1 | Account : 8", - "2 | Sequence : 0", - "3 | Type : Multi Send", - "4 | Source Address [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", - "4 | Source Address [2/2] : 69d6cv", - "5 | Source Coins : 101000 uatom", - "6 | Dest Address [1/2] : cosmos13dr26wdygna3s8fdl5tlc45m2le2ydyd", - "6 | Dest Address [2/2] : gjk8ek", - "7 | Dest Coins : 1000 uatom", - "8 | Dest Address [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", - "8 | Dest Address [2/2] : 69d6cv", - "9 | Dest Coins : 100000 uatom", - "10 | Fee : 0 uatom", - "11 | Gas : 200000" - ], - "expert": true - }, - { - "name": "minimal_extra_field", - "tx": { - "account_number": "V1", - "chain_id": "V2", - "fee": { - "amount": [ - { - "amount": "b" - }, - { - "c": "d" - }, - { - "x": "y" - } - ], - "gas": "V3" - }, - "foo": "bar", - "memo": "V4", - "msgs": [], - "sequence": "V5", - "unknown_param": "123456" - }, - "foo": "bar", - "parsingErr": "No error", - "validationErr": "Unexpected field", - "expected": [ - "0 | Chain ID : V2", - "1 | Account : V1", - "2 | Sequence : V5", - "3 | Memo : V4", - "4 | fee/amount : Unexpected field", - "5 | Gas : V3" - ], - "expert": true - }, - { - "name": "ibc_denoms", - "tx": { - "account_number": "0", - "chain_id": "cosmoshub-4", - "fee": { - "amount": [ - { - "amount": "5", - "denom": "uatom" - } - ], - "gas": "10000" - }, - "memo": "testmemo", - "msgs": [ - { - "inputs": [ - { - "address": "cosmosaccaddr1d9h8qat5e4ehc5", - "coins": [ - { - "amount": "10", - "denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2" - } - ] - } - ], - "outputs": [ - { - "address": "cosmosaccaddr1da6hgur4wse3jx32", - "coins": [ - { - "amount": "10", - "denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2" - } - ] - } - ] - } - ], - "sequence": "1" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : cosmoshub-4", - "1 | Account : 0", - "2 | Sequence : 1", - "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", - "4 | Source Coins [1/2] : 10 ibc/27394FB092D2ECCD56123C74F36E4C1F", - "4 | Source Coins [2/2] : 926001CEADA9CA97EA622B25F41E5EB2", - "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", - "6 | Dest Coins [1/2] : 10 ibc/27394FB092D2ECCD56123C74F36E4C1F", - "6 | Dest Coins [2/2] : 926001CEADA9CA97EA622B25F41E5EB2", - "7 | Memo : testmemo", - "8 | Fee : 5 uatom", - "9 | Gas : 10000" - ], - "expert": true - }, - { - "name": "huge_test", - "tx": { - "account_number": "1", - "chain_id": "my-chain", - "fee": { "amount": [{ "amount": "2000", "denom": "uatom" }], "gas": "100000", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "payer": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" }, - "memo": "\\u003e ⚛️\\u269B⚛️ ", - "msgs": [ - { - "type": "cosmos-sdk/MsgExec", - "value": { - "grantee": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", - "msgs": [ - { - "type": "cosmos-sdk/MsgSend", - "value": { - "amount": [{ "amount": "10000000", "denom": "uatom" }], - "from_address": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", - "to_address": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" - } - } - ] - } - }, - { - "type": "cosmos-sdk/v1/MsgVote", - "value": { - "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Also it ends in a single ampersand @", - "option": 1, - "proposal_id": "1", - "voter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" - } - } - ], - "sequence": "2", - "timeout_height": "20", - "tip": { - "amount": [ - { "amount": "20000", "denom": "uatom" }, - { "amount": "30000", "denom": "uosmo" } - ], - "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" - } - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : my-chain", - "1 | Account : 1", - "2 | Sequence : 2", - "3 | Type : cosmos-sdk/MsgExec", - "4 | msgs/value/grantee [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", - "4 | msgs/value/grantee [2/2] : a8eyhs", - "5 | msgs/value/msgs [1/6] : [{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{", - "5 | msgs/value/msgs [2/6] : \"amount\":[{\"amount\":\"10000000\",\"denom\":", - "5 | msgs/value/msgs [3/6] : \"uatom\"}],\"from_address\":\"cosmos1ulav3h", - "5 | msgs/value/msgs [4/6] : senupswqfkw2y3sup5kgtqwnvqa8eyhs\",\"to_a", - "5 | msgs/value/msgs [5/6] : ddress\":\"cosmos1ejrf4cur2wy6kfurg9f2jpp", - "5 | msgs/value/msgs [6/6] : p2h3afe5h6pkh5t\"}}]", - "6 | Type : cosmos-sdk/v1/MsgVote", - "7 | msgs/value/metadata [1/13] : Lorem ipsum dolor sit amet, consectetur", - "7 | msgs/value/metadata [2/13] : adipiscing elit, sed do eiusmod tempor", - "7 | msgs/value/metadata [3/13] : incididunt ut labore et dolore magna a", - "7 | msgs/value/metadata [4/13] : liqua. Ut enim ad minim veniam, quis no", - "7 | msgs/value/metadata [5/13] : strud exercitation ullamco laboris nisi", - "7 | msgs/value/metadata [6/13] : ut aliquip ex ea commodo consequat. Du", - "7 | msgs/value/metadata [7/13] : is aute irure dolor in reprehenderit in", - "7 | msgs/value/metadata [8/13] : voluptate velit esse cillum dolore eu", - "7 | msgs/value/metadata [9/13] : fugiat nulla pariatur. Excepteur sint o", - "7 | msgs/value/metadata [10/13] : ccaecat cupidatat non proident, sunt in", - "7 | msgs/value/metadata [11/13] : culpa qui officia deserunt mollit anim", - "7 | msgs/value/metadata [12/13] : id est laborum. Also it ends in a sin", - "7 | msgs/value/metadata [13/13] : gle ampersand @", - "8 | Option : 1", - "9 | Proposal ID : 1", - "10 | Description [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", - "10 | Description [2/2] : a8eyhs", - "11 | Memo [1/2] : \\\\u003e \\u269b\\ufe0f\\\\u269B\\u269b\\ufe0f", - "11 | Memo [2/2] : ", - "12 | Fee : 2000 uatom", - "13 | Gas : 100000", - "14 | Granter [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", - "14 | Granter [2/2] : a8eyhs", - "15 | Payer [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", - "15 | Payer [2/2] : a8eyhs", - "16 | Tip [1/2] : 20000 uatom", - "16 | Tip [2/2] : 30000 uosmo", - "17 | Tipper [1/2] : cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h", - "17 | Tipper [2/2] : 6pkh5t" - ], - "expert": true - }, - { - "name": "MsgSetWithdrawAddress", - "tx":{ - "account_number": "8", - "chain_id": "testing", - "fee": { - "amount": [ - { - "amount": "5000", - "denom": "uatom" - } - ], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgSetWithdrawAddress", - "value": { - "delegator_address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", - "withdraw_address": "cosmos12d64j98tjjpqkx70r08aspc4nvntqp2w6wr2de" - } - }, - { - "type": "cosmos-sdk/MsgWithdrawDelegationReward", - "value": { - "delegator_address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", - "validator_address": "cosmosvaloper13dr26wdygna3s8fdl5tlc45m2le2ydyddxzj49" - } - } - ], - "sequence": "7" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : testing", - "1 | Account : 8", - "2 | Sequence : 7", - "3 | Type : Withdraw Set Address", - "4 | Delegator [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", - "4 | Delegator [2/2] : 69d6cv", - "5 | Withdraw Address [1/2] : cosmos12d64j98tjjpqkx70r08aspc4nvntqp2w", - "5 | Withdraw Address [2/2] : 6wr2de", - "6 | Type : Withdraw Reward", - "7 | Delegator [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", - "7 | Delegator [2/2] : 69d6cv", - "8 | Validator [1/2] : cosmosvaloper13dr26wdygna3s8fdl5tlc45m2", - "8 | Validator [2/2] : le2ydyddxzj49", - "9 | Fee : 5000 uatom", - "10 | Gas : 200000" - ], - "expert": true - }, - { - "name": "Gaia_Sign_00", - "tx": { - "account_number":"8", - "sequence":"2", - "chain_id":"my-chain", - "memo":"A B C", - "fee":{ - "amount":[], - "gas":"200000" - }, - "msgs":[{ - "type":"cosmos-sdk/MsgDeposit", - "value":{ - "amount":[{ - "amount":"10", - "denom":"stake" - }], - "depositor":"cosmos1xl2256vdh0j68khz9wq88hnyqcq0f5f4za2480", - "proposal_id":"1" - } - }] - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : my-chain", - "1 | Account : 8", - "2 | Sequence : 2", - "3 | Type : Deposit", - "4 | Amount : 10 stake", - "5 | Sender [1/2] : cosmos1xl2256vdh0j68khz9wq88hnyqcq0f5f4", - "5 | Sender [2/2] : za2480", - "6 | Proposal ID : 1", - "7 | Memo : A B C", - "8 | Fee : Empty", - "9 | Gas : 200000" - ], - "expert": true - }, - { - "name": "Gaia_Sign_01", - "tx": { - "account_number":"123", - "sequence":"8", - "chain_id":"my-chain", - "fee":{ - "amount":[{ - "denom":"uatom", - "amount":"54" - }], - "gas_limit":"106309", - "granter": "cosmosaccaddr1d9h8xxxGRANTER", - "payer": "cosmosaccaddr1d9h8qatxxPAYER" - }, + } +// { +// "name": "multipleMessages", +// "tx": { +// "account_number": "V1", +// "chain_id": "V2", +// "fee": { +// "amount": [ +// { +// "amount": "b", +// "denom": "d" +// } +// ], +// "gas": "V3" +// }, +// "memo": "V4", +// "msgs": [ +// { +// "m1": "z1" +// }, +// { +// "m2": "z2" +// }, +// { +// "m3": "z3" +// } +// ], +// "sequence": "V5" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : V2", +// "1 | Account : V1", +// "2 | Sequence : V5", +// "3 | msgs/m1 : z1", +// "4 | msgs/m2 : z2", +// "5 | msgs/m3 : z3", +// "6 | Memo : V4", +// "7 | Fee : b d", +// "8 | Gas : V3" +// ], +// "expert": true +// }, +// { +// "name": "completeTransferExpert", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "4 | Source Coins : 10 atom", +// "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "6 | Dest Coins : 10 atom", +// "7 | Memo : testmemo", +// "8 | Fee : 5 photon", +// "9 | Gas : 10000" +// ], +// "expert": true +// }, +// { +// "name": "completeTransfer", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "1 | Source Coins : 10 atom", +// "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "3 | Dest Coins : 10 atom", +// "4 | Memo : testmemo", +// "5 | Fee : 5 photon" +// ], +// "expert": false +// }, +// { +// "name": "completeTransferNoMemoExpert", +// "tx": { +// "account_number": "0", +// "chain_id": "test-chain-1", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "JSON Missing memo", +// "expected": [ +// "0 | Chain ID : test-chain-1", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "4 | Source Coins : 10 atom", +// "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "6 | Dest Coins : 10 atom", +// "7 | Fee : 5 photon", +// "8 | Gas : 10000" +// ], +// "expert": true +// }, +// { +// "name": "completeTransferNoMemo", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "JSON Missing memo", +// "expected": [ +// "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "1 | Source Coins : 10 atom", +// "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "3 | Dest Coins : 10 atom", +// "4 | Fee : 5 photon" +// ], +// "expert": false +// }, +// { +// "name": "completeTransferEmptyMemoExpert", +// "tx": { +// "account_number": "0", +// "chain_id": "test-chain-1", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : test-chain-1", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "4 | Source Coins : 10 atom", +// "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "6 | Dest Coins : 10 atom", +// "7 | Fee : 5 photon", +// "8 | Gas : 10000" +// ], +// "expert": true +// }, +// { +// "name": "completeTransferEmptyMemo", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "1 | Source Coins : 10 atom", +// "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "3 | Dest Coins : 10 atom", +// "4 | Fee : 5 photon" +// ], +// "expert": false +// }, +// { +// "name": "multipleTransfersExpert", +// "tx": { +// "account_number": "0", +// "chain_id": "test-chain-1", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// }, +// { +// "inputs": [ +// { +// "address": "test2", +// "coins": [ +// { +// "amount": "20", +// "denom": "bitcoin" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "test3", +// "coins": [ +// { +// "amount": "50", +// "denom": "ripple" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : test-chain-1", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "4 | Source Coins : 10 atom", +// "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "6 | Dest Coins : 10 atom", +// "7 | Source Address : test2", +// "8 | Source Coins : 20 bitcoin", +// "9 | Dest Address : test3", +// "10 | Dest Coins : 50 ripple", +// "11 | Memo : testmemo", +// "12 | Fee : 5 photon", +// "13 | Gas : 10000" +// ], +// "expert": true +// }, +// { +// "name": "multipleTransfers", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// }, +// { +// "inputs": [ +// { +// "address": "test2", +// "coins": [ +// { +// "amount": "20", +// "denom": "bitcoin" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "test3", +// "coins": [ +// { +// "amount": "50", +// "denom": "ripple" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "1 | Source Coins : 10 atom", +// "2 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "3 | Dest Coins : 10 atom", +// "4 | Source Address : test2", +// "5 | Source Coins : 20 bitcoin", +// "6 | Dest Address : test3", +// "7 | Dest Coins : 50 ripple", +// "8 | Memo : testmemo", +// "9 | Fee : 5 photon" +// ], +// "expert": false +// }, +// { +// "name": "delegationExpert", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Zondax.ch", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 6571", +// "2 | Sequence : 1", +// "3 | Type : Delegate", +// "4 | Amount : 1000000 uatom", +// "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "5 | Delegator [2/2] : 3vwtpl", +// "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "6 | Validator [2/2] : 9m5s03xfytvz7", +// "7 | Memo : Zondax.ch", +// "8 | Fee : 5000 uatom", +// "9 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "delegationDifferentChain", +// "tx": { +// "account_number": "6571", +// "chain_id": "otherhub", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Zondax.ch", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : otherhub", +// "1 | Account : 6571", +// "2 | Sequence : 1", +// "3 | Type : Delegate", +// "4 | Amount : 1000000 uatom", +// "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "5 | Delegator [2/2] : 3vwtpl", +// "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "6 | Validator [2/2] : 9m5s03xfytvz7", +// "7 | Memo : Zondax.ch", +// "8 | Fee : 5000 uatom", +// "9 | Gas : 200000" +// ], +// "expert": false +// }, +// { +// "name": "delegation", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Zondax.ch", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Type : Delegate", +// "1 | Amount : 1.000000 ATOM", +// "2 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "2 | Delegator [2/2] : 3vwtpl", +// "3 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "3 | Validator [2/2] : 9m5s03xfytvz7", +// "4 | Memo : Zondax.ch", +// "5 | Fee : 0.005000 ATOM" +// ], +// "expert": false +// }, +// { +// "name": "proposalExpert", +// "tx": { +// "account_number": "2", +// "chain_id": "local-testnet", +// "fee": { +// "amount": [], +// "gas": "500000" +// }, +// "memo": "abc", +// "msgs": [ +// { +// "description": "test", +// "initial_deposit": [ +// { +// "amount": "1", +// "denom": "stake" +// } +// ], +// "proposal_type": "Text", +// "proposer": "cosmos101234567890abcdefghijklmnopqrstuvwxyz0", +// "title": "test" +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : local-testnet", +// "1 | Account : 2", +// "2 | Sequence : 0", +// "3 | msgs/description : test", +// "4 | msgs/initial_deposit/amount : 1", +// "5 | msgs/initial_deposit/denom : stake", +// "6 | msgs/proposal_type : Text", +// "7 | msgs/proposer [1/2] : cosmos101234567890abcdefghijklmnopqrstu", +// "7 | msgs/proposer [2/2] : vwxyz0", +// "8 | msgs/title : test", +// "9 | Memo : abc", +// "10 | Fee : Empty", +// "11 | Gas : 500000" +// ], +// "expert": true +// }, +// { +// "name": "proposal", +// "tx": { +// "account_number": "2", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [], +// "gas": "500000" +// }, +// "memo": "abc", +// "msgs": [ +// { +// "description": "test", +// "initial_deposit": [ +// { +// "amount": "1", +// "denom": "stake" +// } +// ], +// "proposal_type": "Text", +// "proposer": "cosmos101234567890abcdefghijklmnopqrstuvwxyz0", +// "title": "test" +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | msgs/description : test", +// "1 | msgs/initial_deposit/amount : 1", +// "2 | msgs/initial_deposit/denom : stake", +// "3 | msgs/proposal_type : Text", +// "4 | msgs/proposer [1/2] : cosmos101234567890abcdefghijklmnopqrstu", +// "4 | msgs/proposer [2/2] : vwxyz0", +// "5 | msgs/title : test", +// "6 | Memo : abc", +// "7 | Fee : Empty" +// ], +// "expert": false +// }, +// { +// "name": "delegation2Expert", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Delegated with Ledger from union.market", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 6571", +// "2 | Sequence : 0", +// "3 | Type : Delegate", +// "4 | Amount : 1000000 uatom", +// "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "5 | Delegator [2/2] : 3vwtpl", +// "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "6 | Validator [2/2] : 9m5s03xfytvz7", +// "7 | Memo : Delegated with Ledger from union.market", +// "8 | Fee : 5000 uatom", +// "9 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "delegation2", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Delegated with Ledger from union.market", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Type : Delegate", +// "1 | Amount : 1.000000 ATOM", +// "2 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "2 | Delegator [2/2] : 3vwtpl", +// "3 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "3 | Validator [2/2] : 9m5s03xfytvz7", +// "4 | Memo : Delegated with Ledger from union.market", +// "5 | Fee : 0.005000 ATOM" +// ], +// "expert": false +// }, +// { +// "name": "badcase", +// "tx": { +// "chain_id": "1234567890AB", +// "fee": "1234" +// }, +// "parsingErr": "No error", +// "validationErr": "JSON Missing sequence", +// "expected": [ +// "0 | Chain ID : 1234567890AB", +// "1 | fee : 1234" +// ], +// "expert": true +// }, +// { +// "name": "badcase2", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Delegated with Ledger from union.market", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "amount": { +// "amount": "1000000", +// "denom": "uatom" +// }, +// "delegator_address": "cosmos102hty0jv2s29lyc4u0tv97z9v298e24t3vwtpl", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 6571", +// "2 | Sequence : 0", +// "3 | Type : Delegate", +// "4 | Amount : 1000000 uatom", +// "5 | Delegator [1/2] : cosmos102hty0jv2s29lyc4u0tv97z9v298e24t", +// "5 | Delegator [2/2] : 3vwtpl", +// "6 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "6 | Validator [2/2] : 9m5s03xfytvz7", +// "7 | Memo : Delegated with Ledger from union.market", +// "8 | Fee : 5000 uatom", +// "9 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "oldStackOverflow", +// "tx": { +// "1": [ +// [ +// [ +// [ +// [ +// [ +// [ +// [ +// [ +// [ +// [ +// [ +// { +// "2": "4" +// } +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// ] +// }, +// "parsingErr": "No error", +// "validationErr": "JSON Missing chain_id", +// "expected": [ +// ], +// "expert": true +// }, +// { +// "name": "groupingSmallExpert", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 108", +// "2 | Sequence : 106", +// "3 | Type : Withdraw Reward", +// "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "4 | Delegator [2/2] : hgqhwh", +// "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", +// "5 | Validator [2/2] : vjhennyh568ys", +// "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "6 | Delegator [2/2] : hgqhwh", +// "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", +// "7 | Validator [2/2] : cyz7m0mahdv3p", +// "8 | Fee : 600 uatom", +// "9 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "groupingSmall", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Type : Withdraw Reward", +// "1 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "1 | Delegator [2/2] : hgqhwh", +// "2 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", +// "2 | Validator [2/2] : vjhennyh568ys", +// "3 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", +// "3 | Validator [2/2] : cyz7m0mahdv3p", +// "4 | Fee : 0.000600 ATOM" +// ], +// "expert": false +// }, +// { +// "name": "groupingExpert", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc693ky4t3y2n2ku" +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 108", +// "2 | Sequence : 106", +// "3 | Type : Withdraw Reward", +// "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "4 | Delegator [2/2] : hgqhwh", +// "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", +// "5 | Validator [2/2] : vjhennyh568ys", +// "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "6 | Delegator [2/2] : hgqhwh", +// "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", +// "7 | Validator [2/2] : cyz7m0mahdv3p", +// "8 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "8 | Delegator [2/2] : hgqhwh", +// "9 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "9 | Validator [2/2] : 9m5s03xfytvz7", +// "10 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "10 | Delegator [2/2] : hgqhwh", +// "11 | Validator [1/2] : cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc6", +// "11 | Validator [2/2] : 93ky4t3y2n2ku", +// "12 | Fee : 600 uatom", +// "13 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "grouping_ledger_testcase", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", +// "validator_address": "cosmosvaloper1kn3wugetjuy4zetlq6wadchfhvu3x740ae6z6x" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", +// "validator_address": "cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", +// "validator_address": "cosmosvaloper1ey69r37gfxvxg62sh4r0ktpuc46pzjrm873ae8" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl87jycah", +// "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6" +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 108", +// "2 | Sequence : 106", +// "3 | Type : Withdraw Reward", +// "4 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", +// "4 | Delegator [2/2] : 7jycah", +// "5 | Validator [1/2] : cosmosvaloper1kn3wugetjuy4zetlq6wadchfh", +// "5 | Validator [2/2] : vu3x740ae6z6x", +// "6 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", +// "6 | Delegator [2/2] : 7jycah", +// "7 | Validator [1/2] : cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc", +// "7 | Validator [2/2] : 4n4ef9u2lcnj0", +// "8 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", +// "8 | Delegator [2/2] : 7jycah", +// "9 | Validator [1/2] : cosmosvaloper1ey69r37gfxvxg62sh4r0ktpuc", +// "9 | Validator [2/2] : 46pzjrm873ae8", +// "10 | Delegator [1/2] : cosmos1kky4yzth6gdrm8ga5zlfwhav33yr7hl8", +// "10 | Delegator [2/2] : 7jycah", +// "11 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", +// "11 | Validator [2/2] : 542junl7rsvq6", +// "12 | Fee : 600 uatom", +// "13 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "massive", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1qwl879nx9t6kef4supyazayf7vjhennyh568ys" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxycyz7m0mahdv3p" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc693ky4t3y2n2ku" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1wdrypwex63geqswmcy5qynv4w3z3dyef2qmyna" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper102ruvpv2srmunfffxavttxnhezln6fnc54at8c" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper10e4vsut6suau8tk9m6dnrm0slgd6npe3jx5xpv" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkfv8z992ax69k08" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1ssm0d433seakyak8kcf93yefhknjleeds4y3em" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper13sduv92y3xdhy3rpmhakrc3v7t37e7ps9l0kpv" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper15urq2dtp9qce4fyc85m6upwm9xul3049e02707" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper14kn0kk33szpwus9nh8n87fjel8djx0y070ymmj" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper14lultfckehtszvzw4ehu0apvsr77afvyju5zzy" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1k9a0cs97vul8w2vwknlfmpez6prv8klv03lv3d" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1kj0h4kn4z5xvedu2nd9c4a9a559wvpuvu0h6qn" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos14lultfckehtszvzw4ehu0apvsr77afvyhgqhwh", +// "validator_address": "cosmosvaloper1hjct6q7npsspsg3dgvzk3sdf89spmlpfdn6m9d" +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 108", +// "2 | Sequence : 106", +// "3 | Type : Withdraw Reward", +// "4 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "4 | Delegator [2/2] : hgqhwh", +// "5 | Validator [1/2] : cosmosvaloper1qwl879nx9t6kef4supyazayf7", +// "5 | Validator [2/2] : vjhennyh568ys", +// "6 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "6 | Delegator [2/2] : hgqhwh", +// "7 | Validator [1/2] : cosmosvaloper1x88j7vp2xnw3zec8ur3g4waxy", +// "7 | Validator [2/2] : cyz7m0mahdv3p", +// "8 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "8 | Delegator [2/2] : hgqhwh", +// "9 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "9 | Validator [2/2] : 9m5s03xfytvz7", +// "10 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "10 | Delegator [2/2] : hgqhwh", +// "11 | Validator [1/2] : cosmosvaloper1ttfytaf43nkytzp8hkfjfgjc6", +// "11 | Validator [2/2] : 93ky4t3y2n2ku", +// "12 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "12 | Delegator [2/2] : hgqhwh", +// "13 | Validator [1/2] : cosmosvaloper1wdrypwex63geqswmcy5qynv4w", +// "13 | Validator [2/2] : 3z3dyef2qmyna", +// "14 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "14 | Delegator [2/2] : hgqhwh", +// "15 | Validator [1/2] : cosmosvaloper102ruvpv2srmunfffxavttxnhe", +// "15 | Validator [2/2] : zln6fnc54at8c", +// "16 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "16 | Delegator [2/2] : hgqhwh", +// "17 | Validator [1/2] : cosmosvaloper10e4vsut6suau8tk9m6dnrm0sl", +// "17 | Validator [2/2] : gd6npe3jx5xpv", +// "18 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "18 | Delegator [2/2] : hgqhwh", +// "19 | Validator [1/2] : cosmosvaloper1sxx9mszve0gaedz5ld7qdkjkf", +// "19 | Validator [2/2] : v8z992ax69k08", +// "20 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "20 | Delegator [2/2] : hgqhwh", +// "21 | Validator [1/2] : cosmosvaloper1ssm0d433seakyak8kcf93yefh", +// "21 | Validator [2/2] : knjleeds4y3em", +// "22 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "22 | Delegator [2/2] : hgqhwh", +// "23 | Validator [1/2] : cosmosvaloper13sduv92y3xdhy3rpmhakrc3v7", +// "23 | Validator [2/2] : t37e7ps9l0kpv", +// "24 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "24 | Delegator [2/2] : hgqhwh", +// "25 | Validator [1/2] : cosmosvaloper15urq2dtp9qce4fyc85m6upwm9", +// "25 | Validator [2/2] : xul3049e02707", +// "26 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "26 | Delegator [2/2] : hgqhwh", +// "27 | Validator [1/2] : cosmosvaloper14kn0kk33szpwus9nh8n87fjel", +// "27 | Validator [2/2] : 8djx0y070ymmj", +// "28 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "28 | Delegator [2/2] : hgqhwh", +// "29 | Validator [1/2] : cosmosvaloper14lultfckehtszvzw4ehu0apvs", +// "29 | Validator [2/2] : r77afvyju5zzy", +// "30 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "30 | Delegator [2/2] : hgqhwh", +// "31 | Validator [1/2] : cosmosvaloper1k9a0cs97vul8w2vwknlfmpez6", +// "31 | Validator [2/2] : prv8klv03lv3d", +// "32 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "32 | Delegator [2/2] : hgqhwh", +// "33 | Validator [1/2] : cosmosvaloper1kj0h4kn4z5xvedu2nd9c4a9a5", +// "33 | Validator [2/2] : 59wvpuvu0h6qn", +// "34 | Delegator [1/2] : cosmos14lultfckehtszvzw4ehu0apvsr77afvy", +// "34 | Delegator [2/2] : hgqhwh", +// "35 | Validator [1/2] : cosmosvaloper1hjct6q7npsspsg3dgvzk3sdf8", +// "35 | Validator [2/2] : 9spmlpfdn6m9d", +// "36 | Fee : 600 uatom", +// "37 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "combined", +// "tx": { +// "account_number": "108", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "600", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos19umvgcvk8cxsvzemy239nj9ngc2ltukantgyp3", +// "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6" +// } +// }, +// { +// "type": "cosmos-sdk/MsgDelegate", +// "value": { +// "delegator_address": "cosmos19umvgcvk8cxsvzemy239nj9ngc2ltukantgyp3", +// "validator_address": "cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk542junl7rsvq6", +// "amount": { +// "denom": "uatom", +// "amount": "20139397" +// } +// } +// } +// ], +// "sequence": "106" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Type : Withdraw Reward", +// "1 | Delegator [1/2] : cosmos19umvgcvk8cxsvzemy239nj9ngc2ltuka", +// "1 | Delegator [2/2] : ntgyp3", +// "2 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", +// "2 | Validator [2/2] : 542junl7rsvq6", +// "3 | Type : Delegate", +// "4 | Amount : 20.139397 ATOM", +// "5 | Validator [1/2] : cosmosvaloper1648ynlpdw7fqa2axt0w2yp3fk", +// "5 | Validator [2/2] : 542junl7rsvq6", +// "6 | Fee : 0.000600 ATOM" +// ], +// "expert": false +// }, +// { +// "name": "completeTransferWithTips", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "feecoin1" +// }, +// { +// "amount": "6", +// "denom": "feecoin2" +// } +// ], +// "gas": "10000", +// "granter": "cosmosaccaddr1d9h8xxxGRANTER", +// "payer": "cosmosaccaddr1d9h8qatxxPAYER" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qatxxINPUT", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hguxxOUTPUT", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1", +// "tip": { +// "amount": [ +// { +// "amount": "65", +// "denom": "tipcoin" +// }, +// { +// "amount": "66", +// "denom": "tipcoin2" +// } +// ], +// "tipper": "cosmosaccaddr1d9h8qatxTIPPER" +// } +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qatxxINPUT", +// "4 | Source Coins : 10 atom", +// "5 | Dest Address : cosmosaccaddr1da6hguxxOUTPUT", +// "6 | Dest Coins : 10 atom", +// "7 | Memo : testmemo", +// "8 | Fee [1/2] : 5 feecoin1", +// "8 | Fee [2/2] : 6 feecoin2", +// "9 | Gas : 10000", +// "10 | Granter : cosmosaccaddr1d9h8xxxGRANTER", +// "11 | Payer : cosmosaccaddr1d9h8qatxxPAYER", +// "12 | Tip [1/2] : 65 tipcoin", +// "12 | Tip [2/2] : 66 tipcoin2", +// "13 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" +// ], +// "expert": true +// }, +// { +// "name": "completeTransferWithTipsBasic", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "photon" +// } +// ], +// "gas": "10000", +// "granter": "cosmosaccaddr1d9h8xxxGRANTER", +// "payer": "cosmosaccaddr1d9h8qatxxPAYER" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qatxxINPUT", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hguxxOUTPUT", +// "coins": [ +// { +// "amount": "10", +// "denom": "atom" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1", +// "tip": { +// "amount": [ +// { +// "amount": "65", +// "denom": "tipcoin" +// }, +// { +// "amount": "66", +// "denom": "tipcoin2" +// } +// ], +// "tipper": "cosmosaccaddr1d9h8qatxTIPPER" +// } +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Source Address : cosmosaccaddr1d9h8qatxxINPUT", +// "1 | Source Coins : 10 atom", +// "2 | Dest Address : cosmosaccaddr1da6hguxxOUTPUT", +// "3 | Dest Coins : 10 atom", +// "4 | Memo : testmemo", +// "5 | Fee : 5 photon", +// "6 | Tip [1/2] : 65 tipcoin", +// "6 | Tip [2/2] : 66 tipcoin2", +// "7 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" +// ], +// "expert": false +// }, +// { +// "name": "doubleFees", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "feecoin1" +// }, +// { +// "amount": "6", +// "denom": "feecoin2" +// } +// ], +// "gas": "10000", +// "granter": "cosmosaccaddr1d9h8xxxGRANTER", +// "payer": "cosmosaccaddr1d9h8qatxxPAYER" +// }, +// "memo": "", +// "msgs": [], +// "sequence": "1", +// "tip": { +// "amount": [ +// { +// "amount": "65", +// "denom": "tipcoin" +// }, +// { +// "amount": "66", +// "denom": "tipcoin2" +// } +// ], +// "tipper": "cosmosaccaddr1d9h8qatxTIPPER" +// } +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Fee [1/2] : 5 feecoin1", +// "3 | Fee [2/2] : 6 feecoin2", +// "4 | Gas : 10000", +// "5 | Granter : cosmosaccaddr1d9h8xxxGRANTER", +// "6 | Payer : cosmosaccaddr1d9h8qatxxPAYER", +// "7 | Tip [1/2] : 65 tipcoin", +// "7 | Tip [2/2] : 66 tipcoin2", +// "8 | Tipper : cosmosaccaddr1d9h8qatxTIPPER" +// ], +// "expert": true +// }, +// { +// "name": "MsgWithdrawValidatorCommission", +// "tx": { +// "account_number": "6571", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "Zondax.ch", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgWithdrawValidatorCommission", +// "value": { +// "validator_address": "cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt9m5s03xfytvz7" +// } +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Type : Withdraw Val. Commission", +// "1 | Validator [1/2] : cosmosvaloper1grgelyng2v6v3t8z87wu3sxgt", +// "1 | Validator [2/2] : 9m5s03xfytvz7", +// "2 | Memo : Zondax.ch", +// "3 | Fee : 0.005000 ATOM" +// ], +// "expert": false +// }, +// { +// "name": "MsgMultiSend", +// "tx": { +// "account_number": "8", +// "chain_id": "testing", +// "fee": { +// "amount": [ +// { +// "amount": "0", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgMultiSend", +// "value": { +// "inputs": [ +// { +// "address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", +// "coins": [ +// { +// "amount": "101000", +// "denom": "uatom" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmos13dr26wdygna3s8fdl5tlc45m2le2ydydgjk8ek", +// "coins": [ +// { +// "amount": "1000", +// "denom": "uatom" +// } +// ] +// }, +// { +// "address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", +// "coins": [ +// { +// "amount": "100000", +// "denom": "uatom" +// } +// ] +// } +// ] +// } +// } +// ], +// "sequence": "0" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : testing", +// "1 | Account : 8", +// "2 | Sequence : 0", +// "3 | Type : Multi Send", +// "4 | Source Address [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", +// "4 | Source Address [2/2] : 69d6cv", +// "5 | Source Coins : 101000 uatom", +// "6 | Dest Address [1/2] : cosmos13dr26wdygna3s8fdl5tlc45m2le2ydyd", +// "6 | Dest Address [2/2] : gjk8ek", +// "7 | Dest Coins : 1000 uatom", +// "8 | Dest Address [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", +// "8 | Dest Address [2/2] : 69d6cv", +// "9 | Dest Coins : 100000 uatom", +// "10 | Fee : 0 uatom", +// "11 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "minimal_extra_field", +// "tx": { +// "account_number": "V1", +// "chain_id": "V2", +// "fee": { +// "amount": [ +// { +// "amount": "b" +// }, +// { +// "c": "d" +// }, +// { +// "x": "y" +// } +// ], +// "gas": "V3" +// }, +// "foo": "bar", +// "memo": "V4", +// "msgs": [], +// "sequence": "V5", +// "unknown_param": "123456" +// }, +// "foo": "bar", +// "parsingErr": "No error", +// "validationErr": "Unexpected field", +// "expected": [ +// "0 | Chain ID : V2", +// "1 | Account : V1", +// "2 | Sequence : V5", +// "3 | Memo : V4", +// "4 | fee/amount : Unexpected field", +// "5 | Gas : V3" +// ], +// "expert": true +// }, +// { +// "name": "ibc_denoms", +// "tx": { +// "account_number": "0", +// "chain_id": "cosmoshub-4", +// "fee": { +// "amount": [ +// { +// "amount": "5", +// "denom": "uatom" +// } +// ], +// "gas": "10000" +// }, +// "memo": "testmemo", +// "msgs": [ +// { +// "inputs": [ +// { +// "address": "cosmosaccaddr1d9h8qat5e4ehc5", +// "coins": [ +// { +// "amount": "10", +// "denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmosaccaddr1da6hgur4wse3jx32", +// "coins": [ +// { +// "amount": "10", +// "denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2" +// } +// ] +// } +// ] +// } +// ], +// "sequence": "1" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : cosmoshub-4", +// "1 | Account : 0", +// "2 | Sequence : 1", +// "3 | Source Address : cosmosaccaddr1d9h8qat5e4ehc5", +// "4 | Source Coins [1/2] : 10 ibc/27394FB092D2ECCD56123C74F36E4C1F", +// "4 | Source Coins [2/2] : 926001CEADA9CA97EA622B25F41E5EB2", +// "5 | Dest Address : cosmosaccaddr1da6hgur4wse3jx32", +// "6 | Dest Coins [1/2] : 10 ibc/27394FB092D2ECCD56123C74F36E4C1F", +// "6 | Dest Coins [2/2] : 926001CEADA9CA97EA622B25F41E5EB2", +// "7 | Memo : testmemo", +// "8 | Fee : 5 uatom", +// "9 | Gas : 10000" +// ], +// "expert": true +// }, +// { +// "name": "huge_test", +// "tx": { +// "account_number": "1", +// "chain_id": "my-chain", +// "fee": { "amount": [{ "amount": "2000", "denom": "uatom" }], "gas": "100000", "granter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", "payer": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" }, +// "memo": "\\u003e ⚛️\\u269B⚛️ ", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgExec", +// "value": { +// "grantee": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgSend", +// "value": { +// "amount": [{ "amount": "10000000", "denom": "uatom" }], +// "from_address": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs", +// "to_address": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" +// } +// } +// ] +// } +// }, +// { +// "type": "cosmos-sdk/v1/MsgVote", +// "value": { +// "metadata": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Also it ends in a single ampersand @", +// "option": 1, +// "proposal_id": "1", +// "voter": "cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvqa8eyhs" +// } +// } +// ], +// "sequence": "2", +// "timeout_height": "20", +// "tip": { +// "amount": [ +// { "amount": "20000", "denom": "uatom" }, +// { "amount": "30000", "denom": "uosmo" } +// ], +// "tipper": "cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h6pkh5t" +// } +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : my-chain", +// "1 | Account : 1", +// "2 | Sequence : 2", +// "3 | Type : cosmos-sdk/MsgExec", +// "4 | msgs/value/grantee [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", +// "4 | msgs/value/grantee [2/2] : a8eyhs", +// "5 | msgs/value/msgs [1/6] : [{\"type\":\"cosmos-sdk/MsgSend\",\"value\":{", +// "5 | msgs/value/msgs [2/6] : \"amount\":[{\"amount\":\"10000000\",\"denom\":", +// "5 | msgs/value/msgs [3/6] : \"uatom\"}],\"from_address\":\"cosmos1ulav3h", +// "5 | msgs/value/msgs [4/6] : senupswqfkw2y3sup5kgtqwnvqa8eyhs\",\"to_a", +// "5 | msgs/value/msgs [5/6] : ddress\":\"cosmos1ejrf4cur2wy6kfurg9f2jpp", +// "5 | msgs/value/msgs [6/6] : p2h3afe5h6pkh5t\"}}]", +// "6 | Type : cosmos-sdk/v1/MsgVote", +// "7 | msgs/value/metadata [1/13] : Lorem ipsum dolor sit amet, consectetur", +// "7 | msgs/value/metadata [2/13] : adipiscing elit, sed do eiusmod tempor", +// "7 | msgs/value/metadata [3/13] : incididunt ut labore et dolore magna a", +// "7 | msgs/value/metadata [4/13] : liqua. Ut enim ad minim veniam, quis no", +// "7 | msgs/value/metadata [5/13] : strud exercitation ullamco laboris nisi", +// "7 | msgs/value/metadata [6/13] : ut aliquip ex ea commodo consequat. Du", +// "7 | msgs/value/metadata [7/13] : is aute irure dolor in reprehenderit in", +// "7 | msgs/value/metadata [8/13] : voluptate velit esse cillum dolore eu", +// "7 | msgs/value/metadata [9/13] : fugiat nulla pariatur. Excepteur sint o", +// "7 | msgs/value/metadata [10/13] : ccaecat cupidatat non proident, sunt in", +// "7 | msgs/value/metadata [11/13] : culpa qui officia deserunt mollit anim", +// "7 | msgs/value/metadata [12/13] : id est laborum. Also it ends in a sin", +// "7 | msgs/value/metadata [13/13] : gle ampersand @", +// "8 | Option : 1", +// "9 | Proposal ID : 1", +// "10 | Description [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", +// "10 | Description [2/2] : a8eyhs", +// "11 | Memo [1/2] : \\\\u003e \\u269b\\ufe0f\\\\u269B\\u269b\\ufe0f", +// "11 | Memo [2/2] : ", +// "12 | Fee : 2000 uatom", +// "13 | Gas : 100000", +// "14 | Granter [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", +// "14 | Granter [2/2] : a8eyhs", +// "15 | Payer [1/2] : cosmos1ulav3hsenupswqfkw2y3sup5kgtqwnvq", +// "15 | Payer [2/2] : a8eyhs", +// "16 | Tip [1/2] : 20000 uatom", +// "16 | Tip [2/2] : 30000 uosmo", +// "17 | Tipper [1/2] : cosmos1ejrf4cur2wy6kfurg9f2jppp2h3afe5h", +// "17 | Tipper [2/2] : 6pkh5t" +// ], +// "expert": true +// }, +// { +// "name": "MsgSetWithdrawAddress", +// "tx":{ +// "account_number": "8", +// "chain_id": "testing", +// "fee": { +// "amount": [ +// { +// "amount": "5000", +// "denom": "uatom" +// } +// ], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgSetWithdrawAddress", +// "value": { +// "delegator_address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", +// "withdraw_address": "cosmos12d64j98tjjpqkx70r08aspc4nvntqp2w6wr2de" +// } +// }, +// { +// "type": "cosmos-sdk/MsgWithdrawDelegationReward", +// "value": { +// "delegator_address": "cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p69d6cv", +// "validator_address": "cosmosvaloper13dr26wdygna3s8fdl5tlc45m2le2ydyddxzj49" +// } +// } +// ], +// "sequence": "7" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : testing", +// "1 | Account : 8", +// "2 | Sequence : 7", +// "3 | Type : Withdraw Set Address", +// "4 | Delegator [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", +// "4 | Delegator [2/2] : 69d6cv", +// "5 | Withdraw Address [1/2] : cosmos12d64j98tjjpqkx70r08aspc4nvntqp2w", +// "5 | Withdraw Address [2/2] : 6wr2de", +// "6 | Type : Withdraw Reward", +// "7 | Delegator [1/2] : cosmos1hr9x0sjvel6z3vt9qny8sdd5gnnlgk0p", +// "7 | Delegator [2/2] : 69d6cv", +// "8 | Validator [1/2] : cosmosvaloper13dr26wdygna3s8fdl5tlc45m2", +// "8 | Validator [2/2] : le2ydyddxzj49", +// "9 | Fee : 5000 uatom", +// "10 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "Gaia_Sign_00", +// "tx": { +// "account_number":"8", +// "sequence":"2", +// "chain_id":"my-chain", +// "memo":"A B C", +// "fee":{ +// "amount":[], +// "gas":"200000" +// }, +// "msgs":[{ +// "type":"cosmos-sdk/MsgDeposit", +// "value":{ +// "amount":[{ +// "amount":"10", +// "denom":"stake" +// }], +// "depositor":"cosmos1xl2256vdh0j68khz9wq88hnyqcq0f5f4za2480", +// "proposal_id":"1" +// } +// }] +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : my-chain", +// "1 | Account : 8", +// "2 | Sequence : 2", +// "3 | Type : Deposit", +// "4 | Amount : 10 stake", +// "5 | Sender [1/2] : cosmos1xl2256vdh0j68khz9wq88hnyqcq0f5f4", +// "5 | Sender [2/2] : za2480", +// "6 | Proposal ID : 1", +// "7 | Memo : A B C", +// "8 | Fee : Empty", +// "9 | Gas : 200000" +// ], +// "expert": true +// }, +// { +// "name": "Gaia_Sign_01", +// "tx": { +// "account_number":"123", +// "sequence":"8", +// "chain_id":"my-chain", +// "fee":{ +// "amount":[{ +// "denom":"uatom", +// "amount":"54" +// }], +// "gas_limit":"106309", +// "granter": "cosmosaccaddr1d9h8xxxGRANTER", +// "payer": "cosmosaccaddr1d9h8qatxxPAYER" +// }, - "msgs":[{ - "type":"cosmos-sdk/MsgDeposit", - "value":{ - "amount":[{ - "amount":"255000000", - "denom":"uatom" - }], - "depositor":"cosmos1849m9wncrqp6v4tkss6a3j8uzvuv0cp7wcgvqa", - "proposal_id":"44" - } - }], - "memo":"", - "timeout_height":"0", - "extension_options":[], - "non_critical_extension_options":[], - "auth_info":{ - "signer_infos":[] - }, - "signatures":[] - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : my-chain", - "1 | Account : 123", - "2 | Sequence : 8", - "3 | Type : Deposit", - "4 | Amount : 255000000 uatom", - "5 | Sender [1/2] : cosmos1849m9wncrqp6v4tkss6a3j8uzvuv0cp7", - "5 | Sender [2/2] : wcgvqa", - "6 | Proposal ID : 44", - "7 | Fee : 54 uatom", - "8 | Gas Limit : 106309", - "9 | Granter : cosmosaccaddr1d9h8xxxGRANTER", - "10 | Payer : cosmosaccaddr1d9h8qatxxPAYER" - ], - "expert": true - }, - { - "name": "AMINO_MultiSend", - "tx": { - "account_number": "10", - "chain_id": "chain-WiONzW", - "fee": { - "amount": [], - "gas": "200000" - }, - "memo": "", - "msgs": [ - { - "type": "cosmos-sdk/MsgMultiSend", - "value": { - "inputs": [ - { - "address": "cosmos1w4efqfklkezgyt6lncjdwxncrzyzpr2efzcqal", - "coins": [ - { - "amount": "30", - "denom": "stake" - } - ] - } - ], - "outputs": [ - { - "address": "cosmos184hgxlzat3qhm7p28563w4jyw4aa3wcgnj6gtv", - "coins": [ - { - "amount": "10", - "denom": "stake" - } - ] - }, - { - "address": "cosmos1pfyz36qx8z8dm8ktd75mwx5j5vsmkzfn7wrgp9", - "coins": [ - { - "amount": "10", - "denom": "stake" - } - ] - }, - { - "address": "cosmos1xu388ml6krya3ysmlrup2ylxjtzhl4hlaem3ng", - "coins": [ - { - "amount": "10", - "denom": "stake" - } - ] - } - ] - } - } - ], - "sequence": "16" - }, - "parsingErr": "No error", - "validationErr": "No error", - "expected": [ - "0 | Chain ID : chain-WiONzW", - "1 | Account : 10", - "2 | Sequence : 16", - "3 | Type : Multi Send", - "4 | Source Address [1/2] : cosmos1w4efqfklkezgyt6lncjdwxncrzyzpr2e", - "4 | Source Address [2/2] : fzcqal", - "5 | Source Coins : 30 stake", - "6 | Dest Address [1/2] : cosmos184hgxlzat3qhm7p28563w4jyw4aa3wcg", - "6 | Dest Address [2/2] : nj6gtv", - "7 | Dest Coins : 10 stake", - "8 | Dest Address [1/2] : cosmos1pfyz36qx8z8dm8ktd75mwx5j5vsmkzfn", - "8 | Dest Address [2/2] : 7wrgp9", - "9 | Dest Coins : 10 stake", - "10 | Dest Address [1/2] : cosmos1xu388ml6krya3ysmlrup2ylxjtzhl4hl", - "10 | Dest Address [2/2] : aem3ng", - "11 | Dest Coins : 10 stake", - "12 | Fee : Empty", - "13 | Gas : 200000" - ], - "expert": true +// "msgs":[{ +// "type":"cosmos-sdk/MsgDeposit", +// "value":{ +// "amount":[{ +// "amount":"255000000", +// "denom":"uatom" +// }], +// "depositor":"cosmos1849m9wncrqp6v4tkss6a3j8uzvuv0cp7wcgvqa", +// "proposal_id":"44" +// } +// }], +// "memo":"", +// "timeout_height":"0", +// "extension_options":[], +// "non_critical_extension_options":[], +// "auth_info":{ +// "signer_infos":[] +// }, +// "signatures":[] +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : my-chain", +// "1 | Account : 123", +// "2 | Sequence : 8", +// "3 | Type : Deposit", +// "4 | Amount : 255000000 uatom", +// "5 | Sender [1/2] : cosmos1849m9wncrqp6v4tkss6a3j8uzvuv0cp7", +// "5 | Sender [2/2] : wcgvqa", +// "6 | Proposal ID : 44", +// "7 | Fee : 54 uatom", +// "8 | Gas Limit : 106309", +// "9 | Granter : cosmosaccaddr1d9h8xxxGRANTER", +// "10 | Payer : cosmosaccaddr1d9h8qatxxPAYER" +// ], +// "expert": true +// }, +// { +// "name": "AMINO_MultiSend", +// "tx": { +// "account_number": "10", +// "chain_id": "chain-WiONzW", +// "fee": { +// "amount": [], +// "gas": "200000" +// }, +// "memo": "", +// "msgs": [ +// { +// "type": "cosmos-sdk/MsgMultiSend", +// "value": { +// "inputs": [ +// { +// "address": "cosmos1w4efqfklkezgyt6lncjdwxncrzyzpr2efzcqal", +// "coins": [ +// { +// "amount": "30", +// "denom": "stake" +// } +// ] +// } +// ], +// "outputs": [ +// { +// "address": "cosmos184hgxlzat3qhm7p28563w4jyw4aa3wcgnj6gtv", +// "coins": [ +// { +// "amount": "10", +// "denom": "stake" +// } +// ] +// }, +// { +// "address": "cosmos1pfyz36qx8z8dm8ktd75mwx5j5vsmkzfn7wrgp9", +// "coins": [ +// { +// "amount": "10", +// "denom": "stake" +// } +// ] +// }, +// { +// "address": "cosmos1xu388ml6krya3ysmlrup2ylxjtzhl4hlaem3ng", +// "coins": [ +// { +// "amount": "10", +// "denom": "stake" +// } +// ] +// } +// ] +// } +// } +// ], +// "sequence": "16" +// }, +// "parsingErr": "No error", +// "validationErr": "No error", +// "expected": [ +// "0 | Chain ID : chain-WiONzW", +// "1 | Account : 10", +// "2 | Sequence : 16", +// "3 | Type : Multi Send", +// "4 | Source Address [1/2] : cosmos1w4efqfklkezgyt6lncjdwxncrzyzpr2e", +// "4 | Source Address [2/2] : fzcqal", +// "5 | Source Coins : 30 stake", +// "6 | Dest Address [1/2] : cosmos184hgxlzat3qhm7p28563w4jyw4aa3wcg", +// "6 | Dest Address [2/2] : nj6gtv", +// "7 | Dest Coins : 10 stake", +// "8 | Dest Address [1/2] : cosmos1pfyz36qx8z8dm8ktd75mwx5j5vsmkzfn", +// "8 | Dest Address [2/2] : 7wrgp9", +// "9 | Dest Coins : 10 stake", +// "10 | Dest Address [1/2] : cosmos1xu388ml6krya3ysmlrup2ylxjtzhl4hl", +// "10 | Dest Address [2/2] : aem3ng", +// "11 | Dest Coins : 10 stake", +// "12 | Fee : Empty", +// "13 | Gas : 200000" +// ], +// "expert": true -} +// } ] diff --git a/tests/ui_tests.cpp b/tests/ui_tests.cpp index 8b5aa8f7..7c9693b6 100644 --- a/tests/ui_tests.cpp +++ b/tests/ui_tests.cpp @@ -145,15 +145,15 @@ INSTANTIATE_TEST_SUITE_P ( // NOLINT(cert-err58-cpp) JsonTests_Secp256::PrintToStringParamName() ); -INSTANTIATE_TEST_SUITE_P ( // NOLINT(cert-err58-cpp) - JsonTestTextualCases, - JsonTests_Textual, - ::testing::ValuesIn(GetJsonTextualTestCases("testcases/textual.json")), - JsonTests_Textual::PrintToStringParamName() -); +// INSTANTIATE_TEST_SUITE_P ( // NOLINT(cert-err58-cpp) +// JsonTestTextualCases, +// JsonTests_Textual, +// ::testing::ValuesIn(GetJsonTextualTestCases("testcases/textual.json")), +// JsonTests_Textual::PrintToStringParamName() +// ); TEST_P(JsonTests_Secp256, ValidateTestcase) { validate_testcase(GetParam()); } TEST_P(JsonTests_Secp256, CheckUIOutput) { check_testcase(GetParam()); } -TEST_P(JsonTests_Textual, Normal) { check_Textualtestcase(GetParam(), false); } -TEST_P(JsonTests_Textual, Expert) { check_Textualtestcase(GetParam(), true); } +//TEST_P(JsonTests_Textual, Normal) { check_Textualtestcase(GetParam(), false); } +//TEST_P(JsonTests_Textual, Expert) { check_Textualtestcase(GetParam(), true); } diff --git a/tests_zemu/tests/amino.test.ts b/tests_zemu/tests/amino.test.ts index 9bc28d0f..b80f90ca 100644 --- a/tests_zemu/tests/amino.test.ts +++ b/tests_zemu/tests/amino.test.ts @@ -27,6 +27,7 @@ import { setWithdrawAddress, cliGovDeposit, example_tx_str_msgMultiSend, + testtx, } from './common' // @ts-ignore @@ -39,243 +40,243 @@ jest.setTimeout(120000) describe('Amino', function () { // eslint-disable-next-line jest/expect-expect - test.concurrent.each(DEVICE_MODELS)('can start and stop container', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('sign basic normal', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") - const hrp = 'cosmos' - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') - - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('sign basic normal2', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_basic2)) - const hrp = 'cosmos' - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic2`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('sign basic with extra fields', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_basic)) - const hrp = 'cosmos' - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic_extra_fields`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') - - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) + // test.concurrent.each(DEVICE_MODELS)('can start and stop container', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // } finally { + // await sim.close() + // } + // }) + + // test.concurrent.each(DEVICE_MODELS)('sign basic normal', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // const app = new CosmosApp(sim.getTransport()) + + // const path = [44, 118, 0, 0, 0] + // const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") + // const hrp = 'cosmos' + + // // get address / publickey + // const respPk = await app.getAddressAndPubKey(path, hrp) + // expect(respPk.return_code).toEqual(0x9000) + // expect(respPk.error_message).toEqual('No errors') + // console.log(respPk) + + // // do not wait here.. + // const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + + // // Wait until we are not in the main menu + // await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + // await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic`) + + // const resp = await signatureRequest + // console.log(resp) + + // expect(resp.return_code).toEqual(0x9000) + // expect(resp.error_message).toEqual('No errors') + // expect(resp).toHaveProperty('signature') + + // // Now verify the signature + // const hash = crypto.createHash('sha256') + // const msgHash = Uint8Array.from(hash.update(tx).digest()) + + // const signatureDER = resp.signature + // const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + + // const pk = Uint8Array.from(respPk.compressed_pk) + + // const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) + // expect(signatureOk).toEqual(true) + // } finally { + // await sim.close() + // } + // }) + + // test.concurrent.each(DEVICE_MODELS)('sign basic normal2', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // const app = new CosmosApp(sim.getTransport()) + + // const path = [44, 118, 0, 0, 0] + // const tx = Buffer.from(JSON.stringify(example_tx_str_basic2)) + // const hrp = 'cosmos' + + // // get address / publickey + // const respPk = await app.getAddressAndPubKey(path, hrp) + // expect(respPk.return_code).toEqual(0x9000) + // expect(respPk.error_message).toEqual('No errors') + // console.log(respPk) + + // // do not wait here.. + // const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + + // // Wait until we are not in the main menu + // await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + // await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic2`) + + // const resp = await signatureRequest + // console.log(resp) + + // expect(resp.return_code).toEqual(0x9000) + // expect(resp.error_message).toEqual('No errors') + + // // Now verify the signature + // const hash = crypto.createHash('sha256') + // const msgHash = Uint8Array.from(hash.update(tx).digest()) + + // const signatureDER = resp.signature + // const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + + // const pk = Uint8Array.from(respPk.compressed_pk) + + // const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) + // expect(signatureOk).toEqual(true) + // } finally { + // await sim.close() + // } + // }) + + // test.concurrent.each(DEVICE_MODELS)('sign basic with extra fields', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // const app = new CosmosApp(sim.getTransport()) + + // const path = [44, 118, 0, 0, 0] + // const tx = Buffer.from(JSON.stringify(example_tx_str_basic)) + // const hrp = 'cosmos' + + // // get address / publickey + // const respPk = await app.getAddressAndPubKey(path, hrp) + // expect(respPk.return_code).toEqual(0x9000) + // expect(respPk.error_message).toEqual('No errors') + // console.log(respPk) + + // // do not wait here.. + // const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + + // // Wait until we are not in the main menu + // await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + // await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic_extra_fields`) + + // const resp = await signatureRequest + // console.log(resp) + + // expect(resp.return_code).toEqual(0x9000) + // expect(resp.error_message).toEqual('No errors') + // expect(resp).toHaveProperty('signature') + + // // Now verify the signature + // const hash = crypto.createHash('sha256') + // const msgHash = Uint8Array.from(hash.update(tx).digest()) + + // const signatureDER = resp.signature + // const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + + // const pk = Uint8Array.from(respPk.compressed_pk) + + // const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) + // expect(signatureOk).toEqual(true) + // } finally { + // await sim.close() + // } + // }) + + // test.concurrent.each(DEVICE_MODELS)('ibc denoms', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // const app = new CosmosApp(sim.getTransport()) + + // const path = [44, 118, 0, 0, 0] + // const tx = Buffer.from(JSON.stringify(ibc_denoms)) + // const hrp = 'cosmos' + + // // get address / publickey + // const respPk = await app.getAddressAndPubKey(path, hrp) + // expect(respPk.return_code).toEqual(0x9000) + // expect(respPk.error_message).toEqual('No errors') + // console.log(respPk) + + // // do not wait here.. + // const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - test.concurrent.each(DEVICE_MODELS)('ibc denoms', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) + // // Wait until we are not in the main menu + // await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + // await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-ibc_denoms`) - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(ibc_denoms)) - const hrp = 'cosmos' + // const resp = await signatureRequest + // console.log(resp) - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) + // expect(resp.return_code).toEqual(0x9000) + // expect(resp.error_message).toEqual('No errors') + // expect(resp).toHaveProperty('signature') - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + // // Now verify the signature + // const hash = crypto.createHash('sha256') + // const msgHash = Uint8Array.from(hash.update(tx).digest()) - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-ibc_denoms`) + // const signatureDER = resp.signature + // const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + + // const pk = Uint8Array.from(respPk.compressed_pk) + + // const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) + // expect(signatureOk).toEqual(true) + // } finally { + // await sim.close() + // } + // }) + + // test.concurrent.each(DEVICE_MODELS)('SetWithdrawAddress', async function (m) { + // const sim = new Zemu(m.path) + // try { + // await sim.start({ ...defaultOptions, model: m.name }) + // const app = new CosmosApp(sim.getTransport()) + + // const path = [44, 118, 0, 0, 0] + // const tx = Buffer.from(JSON.stringify(setWithdrawAddress)) + // const hrp = 'cosmos' + + // // get address / publickey + // const respPk = await app.getAddressAndPubKey(path, hrp) + // expect(respPk.return_code).toEqual(0x9000) + // expect(respPk.error_message).toEqual('No errors') + // console.log(respPk) - const resp = await signatureRequest - console.log(resp) + // // do not wait here.. + // const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + + // // Wait until we are not in the main menu + // await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) + // await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-setWithdrawAddress`) - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') + // const resp = await signatureRequest + // console.log(resp) - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) + // expect(resp.return_code).toEqual(0x9000) + // expect(resp.error_message).toEqual('No errors') + // expect(resp).toHaveProperty('signature') - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + // // Now verify the signature + // const hash = crypto.createHash('sha256') + // const msgHash = Uint8Array.from(hash.update(tx).digest()) - const pk = Uint8Array.from(respPk.compressed_pk) + // const signatureDER = resp.signature + // const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('SetWithdrawAddress', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(setWithdrawAddress)) - const hrp = 'cosmos' - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-setWithdrawAddress`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') - - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) + // const pk = Uint8Array.from(respPk.compressed_pk) + + // const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) + // expect(signatureOk).toEqual(true) + // } finally { + // await sim.close() + // } + // }) test.concurrent.each(DEVICE_MODELS)('CLIGovDeposit', async function (m) { const sim = new Zemu(m.path) @@ -284,7 +285,7 @@ describe('Amino', function () { const app = new CosmosApp(sim.getTransport()) const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(cliGovDeposit)) + const tx = Buffer.from(JSON.stringify(testtx)) const hrp = 'cosmos' // get address / publickey @@ -298,7 +299,7 @@ describe('Amino', function () { // Wait until we are not in the main menu await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-govDeposit`) + await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-testtx`) const resp = await signatureRequest console.log(resp) @@ -323,200 +324,200 @@ describe('Amino', function () { } }) - test.concurrent.each(DEVICE_MODELS)('MsgMultisend', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - // Activate expert mode - await sim.toggleExpertMode(); +// test.concurrent.each(DEVICE_MODELS)('MsgMultisend', async function (m) { +// const sim = new Zemu(m.path) +// try { +// await sim.start({ ...defaultOptions, model: m.name }) +// const app = new CosmosApp(sim.getTransport()) - const path = [44, 118, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_msgMultiSend)) - const hrp = 'cosmos' +// // Activate expert mode +// await sim.toggleExpertMode(); - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) +// const path = [44, 118, 0, 0, 0] +// const tx = Buffer.from(JSON.stringify(example_tx_str_msgMultiSend)) +// const hrp = 'cosmos' - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) +// // get address / publickey +// const respPk = await app.getAddressAndPubKey(path, hrp) +// expect(respPk.return_code).toEqual(0x9000) +// expect(respPk.error_message).toEqual('No errors') +// console.log(respPk) - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-msgMultiSend`) +// // do not wait here.. +// const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - const resp = await signatureRequest - console.log(resp) +// // Wait until we are not in the main menu +// await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) +// await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-msgMultiSend`) - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') +// const resp = await signatureRequest +// console.log(resp) - // Now verify the signature - const hash = crypto.createHash('sha256') - const msgHash = Uint8Array.from(hash.update(tx).digest()) +// expect(resp.return_code).toEqual(0x9000) +// expect(resp.error_message).toEqual('No errors') +// expect(resp).toHaveProperty('signature') - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) +// // Now verify the signature +// const hash = crypto.createHash('sha256') +// const msgHash = Uint8Array.from(hash.update(tx).digest()) - const pk = Uint8Array.from(respPk.compressed_pk) +// const signatureDER = resp.signature +// const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) +// const pk = Uint8Array.from(respPk.compressed_pk) - test.concurrent.each(DEVICE_MODELS)('SetWithdrawAddress-eth', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) +// const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) +// expect(signatureOk).toEqual(true) +// } finally { +// await sim.close() +// } +// }) - // Change to expert mode so we can skip fields - await sim.toggleExpertMode(); +// test.concurrent.each(DEVICE_MODELS)('SetWithdrawAddress-eth', async function (m) { +// const sim = new Zemu(m.path) +// try { +// await sim.start({ ...defaultOptions, model: m.name }) +// const app = new CosmosApp(sim.getTransport()) + +// // Change to expert mode so we can skip fields +// await sim.toggleExpertMode(); - const path = [44, 60, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(setWithdrawAddress)) - const hrp = 'inj' +// const path = [44, 60, 0, 0, 0] +// const tx = Buffer.from(JSON.stringify(setWithdrawAddress)) +// const hrp = 'inj' - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-setWithdrawAddress-eth`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') - - // Now verify the signature - const sha3 = require('js-sha3') - const msgHash = Buffer.from(sha3.keccak256(tx), 'hex') - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('sign basic normal Eth', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - // Enable expert to allow sign with eth path - await sim.toggleExpertMode(); - - const path = [44, 60, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") - const hrp = 'inj' - - // check with invalid HRP - const errorRespPk = await app.getAddressAndPubKey(path, 'forbiddenHRP') - expect(errorRespPk.return_code).toEqual(0x6986) - expect(errorRespPk.error_message).toEqual('Transaction rejected') - - // do not wait here.. - const signatureRequest = app.sign(path, tx, hrp) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic_eth`) - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x9000) - expect(resp.error_message).toEqual('No errors') - expect(resp).toHaveProperty('signature') - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, hrp) - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // Now verify the signature - const sha3 = require('js-sha3') - const msgHash = Buffer.from(sha3.keccak256(tx), 'hex') - - const signatureDER = resp.signature - const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) - - const pk = Uint8Array.from(respPk.compressed_pk) - - const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) - expect(signatureOk).toEqual(true) - } finally { - await sim.close() - } - }) - - test.concurrent.each(DEVICE_MODELS)('sign basic normal Eth no expert', async function (m) { - const sim = new Zemu(m.path) - try { - await sim.start({ ...defaultOptions, model: m.name }) - const app = new CosmosApp(sim.getTransport()) - - const path = [44, 60, 0, 0, 0] - const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") - - // get address / publickey - const respPk = await app.getAddressAndPubKey(path, 'inj') - expect(respPk.return_code).toEqual(0x9000) - expect(respPk.error_message).toEqual('No errors') - console.log(respPk) - - // do not wait here.. - const signatureRequest = app.sign(path, tx) - - // Wait until we are not in the main menu - await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) - let nav = undefined; - if (m.name === 'stax') { - const okButton: IButton = { - x: 200, - y: 540, - delay: 0.25, - }; - nav = new TouchNavigation([ - ButtonKind.ConfirmYesButton, - ]); - nav.schedule[0].button = okButton; - } else { - nav = new ClickNavigation([1, 0]); - } - await sim.navigate('.', `${m.prefix.toLowerCase()}-sign_basic_eth_warning`, nav.schedule); - - const resp = await signatureRequest - console.log(resp) - - expect(resp.return_code).toEqual(0x6984) - } finally { - await sim.close() - } - }) +// // get address / publickey +// const respPk = await app.getAddressAndPubKey(path, hrp) +// expect(respPk.return_code).toEqual(0x9000) +// expect(respPk.error_message).toEqual('No errors') +// console.log(respPk) + +// // do not wait here.. +// const signatureRequest = app.sign(path, tx, hrp, AMINO_JSON_TX) + +// // Wait until we are not in the main menu +// await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) +// await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-setWithdrawAddress-eth`) + +// const resp = await signatureRequest +// console.log(resp) + +// expect(resp.return_code).toEqual(0x9000) +// expect(resp.error_message).toEqual('No errors') +// expect(resp).toHaveProperty('signature') + +// // Now verify the signature +// const sha3 = require('js-sha3') +// const msgHash = Buffer.from(sha3.keccak256(tx), 'hex') + +// const signatureDER = resp.signature +// const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + +// const pk = Uint8Array.from(respPk.compressed_pk) + +// const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) +// expect(signatureOk).toEqual(true) +// } finally { +// await sim.close() +// } +// }) + +// test.concurrent.each(DEVICE_MODELS)('sign basic normal Eth', async function (m) { +// const sim = new Zemu(m.path) +// try { +// await sim.start({ ...defaultOptions, model: m.name }) +// const app = new CosmosApp(sim.getTransport()) + +// // Enable expert to allow sign with eth path +// await sim.toggleExpertMode(); + +// const path = [44, 60, 0, 0, 0] +// const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") +// const hrp = 'inj' + +// // check with invalid HRP +// const errorRespPk = await app.getAddressAndPubKey(path, 'forbiddenHRP') +// expect(errorRespPk.return_code).toEqual(0x6986) +// expect(errorRespPk.error_message).toEqual('Transaction rejected') + +// // do not wait here.. +// const signatureRequest = app.sign(path, tx, hrp) + +// // Wait until we are not in the main menu +// await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) +// await sim.compareSnapshotsAndApprove('.', `${m.prefix.toLowerCase()}-sign_basic_eth`) + +// const resp = await signatureRequest +// console.log(resp) + +// expect(resp.return_code).toEqual(0x9000) +// expect(resp.error_message).toEqual('No errors') +// expect(resp).toHaveProperty('signature') + +// // get address / publickey +// const respPk = await app.getAddressAndPubKey(path, hrp) +// expect(respPk.return_code).toEqual(0x9000) +// expect(respPk.error_message).toEqual('No errors') +// console.log(respPk) + +// // Now verify the signature +// const sha3 = require('js-sha3') +// const msgHash = Buffer.from(sha3.keccak256(tx), 'hex') + +// const signatureDER = resp.signature +// const signature = secp256k1.signatureImport(Uint8Array.from(signatureDER)) + +// const pk = Uint8Array.from(respPk.compressed_pk) + +// const signatureOk = secp256k1.ecdsaVerify(signature, msgHash, pk) +// expect(signatureOk).toEqual(true) +// } finally { +// await sim.close() +// } +// }) + +// test.concurrent.each(DEVICE_MODELS)('sign basic normal Eth no expert', async function (m) { +// const sim = new Zemu(m.path) +// try { +// await sim.start({ ...defaultOptions, model: m.name }) +// const app = new CosmosApp(sim.getTransport()) + +// const path = [44, 60, 0, 0, 0] +// const tx = Buffer.from(JSON.stringify(example_tx_str_basic), "utf-8") + +// // get address / publickey +// const respPk = await app.getAddressAndPubKey(path, 'inj') +// expect(respPk.return_code).toEqual(0x9000) +// expect(respPk.error_message).toEqual('No errors') +// console.log(respPk) + +// // do not wait here.. +// const signatureRequest = app.sign(path, tx) + +// // Wait until we are not in the main menu +// await sim.waitUntilScreenIsNot(sim.getMainMenuSnapshot()) +// let nav = undefined; +// if (m.name === 'stax') { +// const okButton: IButton = { +// x: 200, +// y: 540, +// delay: 0.25, +// }; +// nav = new TouchNavigation([ +// ButtonKind.ConfirmYesButton, +// ]); +// nav.schedule[0].button = okButton; +// } else { +// nav = new ClickNavigation([1, 0]); +// } +// await sim.navigate('.', `${m.prefix.toLowerCase()}-sign_basic_eth_warning`, nav.schedule); + +// const resp = await signatureRequest +// console.log(resp) + +// expect(resp.return_code).toEqual(0x6984) +// } finally { +// await sim.close() +// } +// }) }) diff --git a/tests_zemu/tests/common.ts b/tests_zemu/tests/common.ts index 722cae2a..5312593c 100644 --- a/tests_zemu/tests/common.ts +++ b/tests_zemu/tests/common.ts @@ -34,10 +34,10 @@ export const defaultOptions = { } export const DEVICE_MODELS: IDeviceModel[] = [ - { name: 'nanos', prefix: 'S', path: APP_PATH_S }, + //{ name: 'nanos', prefix: 'S', path: APP_PATH_S }, { name: 'nanox', prefix: 'X', path: APP_PATH_X }, - { name: 'nanosp', prefix: 'SP', path: APP_PATH_SP }, - { name: 'stax', prefix: 'ST', path: APP_PATH_ST }, + // { name: 'nanosp', prefix: 'SP', path: APP_PATH_SP }, + // { name: 'stax', prefix: 'ST', path: APP_PATH_ST }, ] export const tx_sign_textual = 'a10192a20168436861696e20696402686d792d636861696ea2016e4163636f756e74206e756d626572026131a2016853657175656e6365026132a301674164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e767161386579687304f5a3016a5075626c6963206b657902781f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657904f5a3026d5075624b6579206f626a656374030104f5a401634b657902785230324542204444374620453446442045423736204443384120323035452046363544203739304320443330452038413337203541354320323532382045423341203932334120463146422034443739203444030204f5a102781e54686973207472616e73616374696f6e206861732031204d657373616765a3016d4d6573736167652028312f312902781c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e640301a2026e4d736753656e64206f626a6563740302a3016c46726f6d206164647265737302782d636f736d6f7331756c6176336873656e7570737771666b77327933737570356b677471776e76716138657968730303a3016a546f206164647265737302782d636f736d6f7331656a726634637572327779366b667572673966326a707070326833616665356836706b6835740303a30166416d6f756e74026731302041544f4d0303a1026e456e64206f66204d657373616765a201644d656d6f0278193e20e29a9befb88f5c7532363942e29a9befb88f2020202020a2016446656573026a302e3030322041544f4da30169476173206c696d697402673130302730303004f5a3017148617368206f66207261772062797465730278403963303433323930313039633237306232666661396633633066613535613039306330313235656265663838316637646135333937386462663933663733383504f5' @@ -358,3 +358,44 @@ export const setWithdrawAddress = { ], sequence: '2' } + +export const testtx = +{ + account_number: "2008470", + chain_id: "osmosis-1", + fee: { + gas: "1198689", + amount: [ + { + amount: "4496", + denom: "uosmo" + } + ] + }, + memo: "FE", + msgs: [ + { + type: "osmosis/poolmanager/swap-exact-amount-in", + value: { + routes: [ + { + pool_id: "1247", + token_out_denom: "ibc/D79E7D83AB399BFFF93433E54FAA480C191248FC556924A2A8351AE2638B3877" + }, + { + pool_id: "1428", + token_out_denom: "ibc/698350B8A61D575025F3ED13E9AC9C0F45C89DEFE92F76D5838F1D3C1A7FF7C9" + } + ], + sender: "osmo1ml9mtk6mhuhmvkvvr7pcfrfjy0z9y9avqaawsm", + token_in: { + amount: "301772", + denom: "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4" + }, + token_out_min_amount: "25036" + } + } + ], + sequence: "2", + timeout_height: "14761501" +} diff --git a/tests_zemu/tests/standard.test.ts b/tests_zemu/tests/standard.test.ts_ similarity index 100% rename from tests_zemu/tests/standard.test.ts rename to tests_zemu/tests/standard.test.ts_ diff --git a/tests_zemu/tests/textual.test.ts b/tests_zemu/tests/textual.test.ts_ similarity index 100% rename from tests_zemu/tests/textual.test.ts rename to tests_zemu/tests/textual.test.ts_