/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { combineCodec, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; export type GovernanceBounds = { minCraftingFeeBps: number; maxCraftingFeeBps: number; maxLocalMarketFeeBps: number; minDaoShareBps: number; maxTreasuryDistributionBps: number; /** Allowed increment between crafting-fee vote choices. */ craftingFeeStepBps: number; /** Allowed increment between local-market-fee vote choices. */ localMarketFeeStepBps: number; /** Allowed increment between local-treasury-share vote choices. */ localTreasuryShareStepBps: number; /** Allowed increment between treasury-distribution vote choices. */ treasuryDistributionStepBps: number; }; export type GovernanceBoundsArgs = GovernanceBounds; export function getGovernanceBoundsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['minCraftingFeeBps', getU16Encoder()], ['maxCraftingFeeBps', getU16Encoder()], ['maxLocalMarketFeeBps', getU16Encoder()], ['minDaoShareBps', getU16Encoder()], ['maxTreasuryDistributionBps', getU16Encoder()], ['craftingFeeStepBps', getU16Encoder()], ['localMarketFeeStepBps', getU16Encoder()], ['localTreasuryShareStepBps', getU16Encoder()], ['treasuryDistributionStepBps', getU16Encoder()], ]); } export function getGovernanceBoundsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['minCraftingFeeBps', getU16Decoder()], ['maxCraftingFeeBps', getU16Decoder()], ['maxLocalMarketFeeBps', getU16Decoder()], ['minDaoShareBps', getU16Decoder()], ['maxTreasuryDistributionBps', getU16Decoder()], ['craftingFeeStepBps', getU16Decoder()], ['localMarketFeeStepBps', getU16Decoder()], ['localTreasuryShareStepBps', getU16Decoder()], ['treasuryDistributionStepBps', getU16Decoder()], ]); } export function getGovernanceBoundsCodec(): FixedSizeCodec< GovernanceBoundsArgs, GovernanceBounds > { return combineCodec( getGovernanceBoundsEncoder(), getGovernanceBoundsDecoder(), ); }