/** * 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 type { Address, FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder, } from "@solana/kit"; import { combineCodec, getAddressDecoder, getAddressEncoder, getI32Decoder, getI32Encoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU128Decoder, getU128Encoder, } from "@solana/kit"; export interface LiquidityDecreased { whirlpool: Address; position: Address; tickLowerIndex: number; tickUpperIndex: number; liquidity: bigint; tokenAAmount: bigint; tokenBAmount: bigint; tokenATransferFee: bigint; tokenBTransferFee: bigint; } export interface LiquidityDecreasedArgs { whirlpool: Address; position: Address; tickLowerIndex: number; tickUpperIndex: number; liquidity: number | bigint; tokenAAmount: number | bigint; tokenBAmount: number | bigint; tokenATransferFee: number | bigint; tokenBTransferFee: number | bigint; } export function getLiquidityDecreasedEncoder(): FixedSizeEncoder { return getStructEncoder([ ["whirlpool", getAddressEncoder()], ["position", getAddressEncoder()], ["tickLowerIndex", getI32Encoder()], ["tickUpperIndex", getI32Encoder()], ["liquidity", getU128Encoder()], ["tokenAAmount", getU64Encoder()], ["tokenBAmount", getU64Encoder()], ["tokenATransferFee", getU64Encoder()], ["tokenBTransferFee", getU64Encoder()], ]); } export function getLiquidityDecreasedDecoder(): FixedSizeDecoder { return getStructDecoder([ ["whirlpool", getAddressDecoder()], ["position", getAddressDecoder()], ["tickLowerIndex", getI32Decoder()], ["tickUpperIndex", getI32Decoder()], ["liquidity", getU128Decoder()], ["tokenAAmount", getU64Decoder()], ["tokenBAmount", getU64Decoder()], ["tokenATransferFee", getU64Decoder()], ["tokenBTransferFee", getU64Decoder()], ]); } export function getLiquidityDecreasedCodec(): FixedSizeCodec< LiquidityDecreasedArgs, LiquidityDecreased > { return combineCodec( getLiquidityDecreasedEncoder(), getLiquidityDecreasedDecoder(), ); }