import { FeeToken, FeeTokenSDKType } from "./feetoken"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial } from "../../../helpers"; /** * UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee * token. It must specify a denom along with gamm pool ID to use as a spot price * calculator. It can be used to add a new denom to the whitelist It can also be * used to update the Pool to associate with the denom. If Pool ID is set to 0, * it will remove the denom from the whitelisted set. */ export interface UpdateFeeTokenProposal { title: string; description: string; feetoken?: FeeToken; } /** * UpdateFeeTokenProposal is a gov Content type for adding a new whitelisted fee * token. It must specify a denom along with gamm pool ID to use as a spot price * calculator. It can be used to add a new denom to the whitelist It can also be * used to update the Pool to associate with the denom. If Pool ID is set to 0, * it will remove the denom from the whitelisted set. */ export interface UpdateFeeTokenProposalSDKType { title: string; description: string; feetoken?: FeeTokenSDKType; } function createBaseUpdateFeeTokenProposal(): UpdateFeeTokenProposal { return { title: "", description: "", feetoken: undefined }; } export const UpdateFeeTokenProposal = { encode(message: UpdateFeeTokenProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.title !== "") { writer.uint32(10).string(message.title); } if (message.description !== "") { writer.uint32(18).string(message.description); } if (message.feetoken !== undefined) { FeeToken.encode(message.feetoken, writer.uint32(26).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UpdateFeeTokenProposal { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateFeeTokenProposal(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.title = reader.string(); break; case 2: message.description = reader.string(); break; case 3: message.feetoken = FeeToken.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: DeepPartial): UpdateFeeTokenProposal { const message = createBaseUpdateFeeTokenProposal(); message.title = object.title ?? ""; message.description = object.description ?? ""; message.feetoken = object.feetoken !== undefined && object.feetoken !== null ? FeeToken.fromPartial(object.feetoken) : undefined; return message; } };