Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

MsgSubmitProposal RLP Type #81

@zakarialounes

Description

@zakarialounes

Anyone have any idea what the problem is with submitting a text-based governance proposal?
This is the only type of message for which I can't get Evmos + Ledger to work with Keplr.

I get the below error:

Error: signature verification failed; please verify account number (1990873) and chain-id (evmos_9001-2): feePayer pubkey EthPubKeySecp256k1{026F434A5E0356CDC54D9999145F5681628D042AE487DE0E44293C134DBBAE5CB6} is different from transaction pubkey EthPubKeySecp256k1{022E10BA94588FE6B3965F46F29F6EF68008B80EF823B0FFB746A53BCD61A3B915}: invalid pubkey [evmos/[email protected]/app/ante/eip712.go:253]: unauthorized
    at r (injectedScript.bundle.js:1:15627)

The used RLP Type:

{
    MsgValue: [
      { name: "content", type: "TypeProposalTextDescription" },
      { name: "initial_deposit", type: "TypeAmount[]" },
      { name: "proposer", type: "string" },
    ],
    TypeProposalTextDescription: [
      { name: "description", type: "string" },
      { name: "title", type: "string" },
      { name: "type", type: "string" },
    ],
    TypeAmount: [
      { name: "denom", type: "string" },
      { name: "amount", type: "string" }
    ],
}

The signDoc content looks like this:

{
    "chain_id": "evmos_9001-2",
    "account_number": "1990873",
    "sequence": "54",
    "fee": {
        "amount": [
            {
                "amount": "2500000000",
                "denom": "aevmos"
            }
        ],
        "gas": "250000",
        "feePayer": "evmos1lmdw0am9y4pa53n33rn8m9wgsyvhl8dhcllmm6"
    },
    "msgs": [
        {
            "type": "cosmos-sdk/MsgSubmitProposal",
            "value": {
                "content": {
                    "type": "cosmos-sdk/TextProposal",
                    "title": "test evmos+ledger with Keplr (please don't deposit for this proposal)",
                    "description": "test evmos+ledger with Keplr (please don't deposit for this proposal)"
                },
                "initial_deposit": [
                    {
                        "amount": "1000000000000",
                        "denom": "aevmos"
                    }
                ],
                "proposer": "evmos1lmdw0am9y4pa53n33rn8m9wgsyvhl8dhcllmm6"
            }
        }
    ],
    "memo": ""
}

If I use type: any for the content property, I get the below error:

Error: unknown type "any" (argument="types", value={"Tx":[{"name":"account_number","type":"string"},{"name":"chain_id","type":"string"},{"name":"fee","type":"Fee"},{"name":"memo","type":"string"},{"name":"msgs","type":"Msg[]"},{"name":"sequence","type":"string"}],"Fee":[{"name":"feePayer","type":"string"},{"name":"amount","type":"Coin[]"},{"name":"gas","type":"string"}],"Coin":[{"name":"denom","type":"string"},{"name":"amount","type":"string"}],"Msg":[{"name":"type","type":"string"},{"name":"value","type":"MsgValue"}],"MsgValue":[{"name":"content","type":"any"},{"name":"initial_deposit","type":"TypeAmount[]"},{"name":"proposer","type":"string"}],"TypeAmount":[{"name":"denom","type":"string"},{"name":"amount","type":"string"}]}, code=INVALID_ARGUMENT, version=hash/5.7.0)
    at r (injectedScript.bundle.js:formatted:847:41)

Thanks in advance 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions