Lunie: Support multimessage transactions

Created on 4 Mar 2019  路  5Comments  路  Source: luniehq/lunie

Is your feature request related to a problem? Please describe.

Some transactions have multiple msg values, which we do not support yet as we're relying only on the first message. For eg:

{
  "height": "193168",
  "txhash": "7E129DFC4EC8887E50136E51252EA50F95FE3ECCEE1F56F722914975913E9106",
  "log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"},{\"msg_index\":\"1\",\"success\":true,\"log\":\"\"}]",
  "gas_wanted": "200000",
  "gas_used": "96158",
  "tags": [
    {
      "key": "action",
      "value": "withdraw_delegation_reward"
    },
    {
      "key": "delegator",
      "value": "cosmos185n9jln2g4w79w39m0g85x2tns6uekqgzrhnap"
    },
    {
      "key": "source-validator",
      "value": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
    },
    {
      "key": "action",
      "value": "withdraw_validator_rewards_all"
    },
    {
      "key": "source-validator",
      "value": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
    }
  ],
  "tx": {
    "type": "auth/StdTx",
    "value": {
      "msg": [
        {
          "type": "cosmos-sdk/MsgWithdrawDelegationReward",
          "value": {
            "delegator_addr": "cosmos185n9jln2g4w79w39m0g85x2tns6uekqgzrhnap",
            "validator_addr": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
          }
        },
        {
          "type": "cosmos-sdk/MsgWithdrawValidatorCommission",
          "value": {
            "validator_addr": "cosmosvaloper185n9jln2g4w79w39m0g85x2tns6uekqg8hrx3j"
          }
        }
      ],
      "fee": {
        "amount": [
          {
            "denom": "photino",
            "amount": "10000"
          }
        ],
        "gas": "200000"
      },
      "signatures": [
        {
          "pub_key": {
            "type": "tendermint/PubKeySecp256k1",
            "value": "AgwqSG/R/k+kUtxO1tVqAMwGvuTDGslMGHdyr8gV7GY7"
          },
          "signature": "aa1hCv1TAEyAr/KYB3bHwX5t+drIKF6u0heeD+vzlUUKUez55w9gJBsf2MORBC5JtnH2ATh+wF3ieKudwH2FkQ=="
        }
      ],
      "memo": ""
    }
  }
}

Describe the solution you'd like

Support multiple message transactions on Voyager

Describe alternatives you've considered

a. Display both messages on the transaction (separated by a divider), or
b. Display multiple transactions with the same tx height and metadata (Li transactions)

Additional context

Mintscan explorer uses the a. approach:

screen shot 2019-03-04 at 9 40 06 am

design-work-needed high priority transactions

Most helpful comment

Are multi messages even used by the SDK as of right now?

gaiacli tx distr withdraw-all-rewards tends to be multi msg (one msg per validator you're delegated to), eg. https://stargazer.certus.one/transactions/122219:4554CDD3DDFD1DF897DB654EB0616A6BCEC6FBA52200F63291D516E5AE412FD8

Also certain power users (cough cough) are manually constructing multi-msg txs: https://stargazer.certus.one/accounts/cosmos1unc788q8md2jymsns24eyhua58palg5kc7cstv

All 5 comments

Are multi messages even used by the SDK as of right now?

I like the idea of just using the LiTransaction and wrapping them in a container. 馃憤

Are multi messages even used by the SDK as of right now?

yes, I've seen lots of those txs on the explorers recently

Are multi messages even used by the SDK as of right now?

gaiacli tx distr withdraw-all-rewards tends to be multi msg (one msg per validator you're delegated to), eg. https://stargazer.certus.one/transactions/122219:4554CDD3DDFD1DF897DB654EB0616A6BCEC6FBA52200F63291D516E5AE412FD8

Also certain power users (cough cough) are manually constructing multi-msg txs: https://stargazer.certus.one/accounts/cosmos1unc788q8md2jymsns24eyhua58palg5kc7cstv

Thanks @ebuchman ! I opened a PR to display them as "separate txs" until the final designs form @jbibla are done

Was this page helpful?
0 / 5 - 0 ratings