Function toPropMsgFull

  • Converts to ProposalMsgFull without parsing, if possible. Use this instead of zProposalMsgFull.parse to avoid parsing twice

    Parameters

    • prop: {
          addr?: string;
          cancelTxHash?: string;
          cdata?: any;
          createTime: Date;
          createTxHash?: string;
          decoded?:
              | {
                  groupNum: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintData: string;
                  propType: "respectBreakout";
                  rankings: string[];
              }
              | {
                  groupNum: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintData: string;
                  propType: "respectBreakoutX2";
                  rankings: string[];
              }
              | {
                  account: string;
                  groupNum?: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintType: number;
                  propType: "respectAccount";
                  reason: string;
                  title: string;
                  tokenId: string;
                  value: bigint;
              }
              | {
                  awards: {
                      account: string;
                      groupNum?: number;
                      meetingNum: number;
                      mintType: number;
                      reason: string;
                      title: string;
                      tokenId: string;
                      value: bigint;
                  }[];
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "respectAccountBatch";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "burnRespect";
                  reason: string;
                  tokenId: string;
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "burnRespectBatch";
                  reason: string;
                  tokenIds: string[];
              }
              | {
                  data: string;
                  link?: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "customSignal";
                  signalType: number;
              }
              | {
                  data?: string;
                  link?: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "tick";
              }
              | {
                  address: string;
                  cdata: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "customCall";
              }
              | {
                  canceledId: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "cancelProposal";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newVetoLen: bigint;
                  newVoteLen: bigint;
                  propType: "setPeriods";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newMinWeight: string;
                  propType: "setMinWeight";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newMaxLiveYesVotes: number;
                  propType: "setMaxLiveYesVotes";
              };
          execError?: {
              args: any[];
              data: null | string;
              name: null | string;
              reason: null | string;
              selector: null | string;
              signature: null | string;
              type: ErrorType;
          };
          executeTxHash?: string;
          id: string;
          memo?: any;
          noWeight?: string;
          stage:
              | "Voting"
              | "Veto"
              | "Execution"
              | "Expired";
          status:
              | "NotExecuted"
              | "Executed"
              | "ExecutionFailed"
              | "Canceled";
          vetoTimeLeftMs: ((...args: unknown[]) => number);
          voteStatus:
              | "Passing"
              | "Failing"
              | "Passed"
              | "Failed";
          voteTimeLeftMs: ((...args: unknown[]) => number);
          yesWeight?: string;
      } | {
          addr: string;
          cancelTxHash?: string;
          cdata: any;
          createTime: Date;
          createTxHash?: string;
          decoded?:
              | {
                  groupNum: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintData: string;
                  propType: "respectBreakout";
                  rankings: string[];
              }
              | {
                  groupNum: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintData: string;
                  propType: "respectBreakoutX2";
                  rankings: string[];
              }
              | {
                  account: string;
                  groupNum?: number;
                  meetingNum: number;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  mintType: number;
                  propType: "respectAccount";
                  reason: string;
                  title: string;
                  tokenId: string;
                  value: bigint;
              }
              | {
                  awards: {
                      account: string;
                      groupNum?: number;
                      meetingNum: number;
                      mintType: number;
                      reason: string;
                      title: string;
                      tokenId: string;
                      value: bigint;
                  }[];
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "respectAccountBatch";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "burnRespect";
                  reason: string;
                  tokenId: string;
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "burnRespectBatch";
                  reason: string;
                  tokenIds: string[];
              }
              | {
                  data: string;
                  link?: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "customSignal";
                  signalType: number;
              }
              | {
                  data?: string;
                  link?: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "tick";
              }
              | {
                  address: string;
                  cdata: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "customCall";
              }
              | {
                  canceledId: string;
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  propType: "cancelProposal";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newVetoLen: bigint;
                  newVoteLen: bigint;
                  propType: "setPeriods";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newMinWeight: string;
                  propType: "setMinWeight";
              }
              | {
                  metadata: {
                      propDescription?: string;
                      propTitle?: string;
                  };
                  newMaxLiveYesVotes: number;
                  propType: "setMaxLiveYesVotes";
              };
          execError?: {
              args: any[];
              data: null | string;
              name: null | string;
              reason: null | string;
              selector: null | string;
              signature: null | string;
              type: ErrorType;
          };
          executeTxHash?: string;
          id: string;
          memo: any;
          noWeight?: string;
          stage:
              | "Voting"
              | "Veto"
              | "Execution"
              | "Expired";
          status:
              | "NotExecuted"
              | "Executed"
              | "ExecutionFailed"
              | "Canceled";
          vetoTimeLeftMs: ((...args: unknown[]) => number);
          voteStatus:
              | "Passing"
              | "Failing"
              | "Passed"
              | "Failed";
          voteTimeLeftMs: ((...args: unknown[]) => number);
          yesWeight?: string;
      }

    Returns ProposalMsgFull