/** * 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, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getCargoIdDecoder, getCargoIdEncoder, type CargoId, type CargoIdArgs, } from '.'; import { getU16F16Decoder, getU16F16Encoder, type U16F16, type U16F16Args, } from '../../fixed/codecs'; export type ScanCost = { /** The token to pay. */ cargo: CargoId; /** Multiplys the fleet's scan cost by this value. */ costMultiplier: U16F16; }; export type ScanCostArgs = { /** The token to pay. */ cargo: CargoIdArgs; /** Multiplys the fleet's scan cost by this value. */ costMultiplier: U16F16Args; }; export function getScanCostEncoder(): Encoder { return getStructEncoder([ ['cargo', getCargoIdEncoder()], ['costMultiplier', getU16F16Encoder()], ]); } export function getScanCostDecoder(): Decoder { return getStructDecoder([ ['cargo', getCargoIdDecoder()], ['costMultiplier', getU16F16Decoder()], ]); } export function getScanCostCodec(): Codec { return combineCodec(getScanCostEncoder(), getScanCostDecoder()); }