Skip to content

Amino exceptions for cosmjs clients #14

@tbruyelle

Description

@tbruyelle

Following atomone-hub/govgen#50, AtomOne requires "amino exceptions" because of its custom gov module.

It might be interesting to add a document in the repo so clients can properly interface with AtomOne.

Here is an attempt of the amino exceptions list:

const aminoExceptions = {
  // v1beta1 messages
  "/atomone.gov.v1beta1.MsgSubmitProposal": {
    aminoType: "atomone/MsgSubmitProposal",
  },
  "/atomone.gov.v1beta1.MsgVote": {
    aminoType: "atomone/MsgVote",
  },
  "/atomone.gov.v1beta1.MsgVoteWeighted": {
    aminoType: "atomone/MsgVoteWeighted",
  },
  "/atomone.gov.v1beta1.MsgDeposit": {
    aminoType: "atomone/MsgDeposit",
  },
  // implementation of v1beta1.Content
  "/atomone.gov.v1beta1.TextProposal": {
    aminoType: "atomone/TextProposal",
  }, 
   "/atomone.gov.v1beta1.LawProposal": {
    aminoType: "atomone/LawProposal",
  }, 
  "/atomone.gov.v1beta1.ConstitutionAmendmentProposal": {
    aminoType: "atomone/ConstitutionAmendmentProposal",
  }, 
  // v1 messages
  "/atomone.gov.v1.MsgSubmitProposal": {
    aminoType: "atomone/v1/MsgSubmitProposal",
  },
  "/atomone.gov.v1.MsgVote": {
    aminoType: "atomone/v1/MsgVote",
  },
  "/atomone.gov.v1.MsgVoteWeighted": {
    aminoType: "atomone/v1/MsgVoteWeighted",
  },
  "/atomone.gov.v1.MsgDeposit": {
    aminoType: "atomone/v1/MsgDeposit",
  },
  "/atomone.gov.v1.MsgExecLegacyContent": {
    aminoType: "atomone/v1/MsgExecLegacyContent",
  },
  "/atomone.gov.v1.MsgUpdateParams": {
    aminoType: "atomone/x/gov/v1/MsgUpdateParams",
  }, 
};

The aminoExceptions must be passed into options.aminoEncoding.exceptions.

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