/** * 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, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type InstantWithdrawVaultEvent = { user: Address; amount: bigint; isAmountInLp: boolean; isWithdrawAll: boolean; userAmountAssetWithdrawn: bigint; userAmountLpBurned: bigint; vault: Address; vaultAssetMint: Address; vaultAssetTotalValueUnlockedBefore: bigint; vaultAssetTotalValueBefore: bigint; vaultAssetTotalValueAfter: bigint; vaultLpSupplyInclFeesBefore: bigint; vaultLpSupplyInclFeesAfter: bigint; vaultLpTotalAccumulatedFeesBefore: bigint; vaultLpTotalAccumulatedFeesAfter: bigint; vaultLpDeadWeightBefore: bigint; vaultLpDeadWeightAfter: bigint; vaultHighestAssetPerLpDecimalBitsBefore: bigint; vaultHighestAssetPerLpDecimalBitsAfter: bigint; withdrawnTs: bigint; }; export type InstantWithdrawVaultEventArgs = { user: Address; amount: number | bigint; isAmountInLp: boolean; isWithdrawAll: boolean; userAmountAssetWithdrawn: number | bigint; userAmountLpBurned: number | bigint; vault: Address; vaultAssetMint: Address; vaultAssetTotalValueUnlockedBefore: number | bigint; vaultAssetTotalValueBefore: number | bigint; vaultAssetTotalValueAfter: number | bigint; vaultLpSupplyInclFeesBefore: number | bigint; vaultLpSupplyInclFeesAfter: number | bigint; vaultLpTotalAccumulatedFeesBefore: number | bigint; vaultLpTotalAccumulatedFeesAfter: number | bigint; vaultLpDeadWeightBefore: number | bigint; vaultLpDeadWeightAfter: number | bigint; vaultHighestAssetPerLpDecimalBitsBefore: number | bigint; vaultHighestAssetPerLpDecimalBitsAfter: number | bigint; withdrawnTs: number | bigint; }; export function getInstantWithdrawVaultEventEncoder(): FixedSizeEncoder { return getStructEncoder([ ["user", getAddressEncoder()], ["amount", getU64Encoder()], ["isAmountInLp", getBooleanEncoder()], ["isWithdrawAll", getBooleanEncoder()], ["userAmountAssetWithdrawn", getU64Encoder()], ["userAmountLpBurned", getU64Encoder()], ["vault", getAddressEncoder()], ["vaultAssetMint", getAddressEncoder()], ["vaultAssetTotalValueUnlockedBefore", getU64Encoder()], ["vaultAssetTotalValueBefore", getU64Encoder()], ["vaultAssetTotalValueAfter", getU64Encoder()], ["vaultLpSupplyInclFeesBefore", getU64Encoder()], ["vaultLpSupplyInclFeesAfter", getU64Encoder()], ["vaultLpTotalAccumulatedFeesBefore", getU64Encoder()], ["vaultLpTotalAccumulatedFeesAfter", getU64Encoder()], ["vaultLpDeadWeightBefore", getU64Encoder()], ["vaultLpDeadWeightAfter", getU64Encoder()], ["vaultHighestAssetPerLpDecimalBitsBefore", getU128Encoder()], ["vaultHighestAssetPerLpDecimalBitsAfter", getU128Encoder()], ["withdrawnTs", getU64Encoder()], ]); } export function getInstantWithdrawVaultEventDecoder(): FixedSizeDecoder { return getStructDecoder([ ["user", getAddressDecoder()], ["amount", getU64Decoder()], ["isAmountInLp", getBooleanDecoder()], ["isWithdrawAll", getBooleanDecoder()], ["userAmountAssetWithdrawn", getU64Decoder()], ["userAmountLpBurned", getU64Decoder()], ["vault", getAddressDecoder()], ["vaultAssetMint", getAddressDecoder()], ["vaultAssetTotalValueUnlockedBefore", getU64Decoder()], ["vaultAssetTotalValueBefore", getU64Decoder()], ["vaultAssetTotalValueAfter", getU64Decoder()], ["vaultLpSupplyInclFeesBefore", getU64Decoder()], ["vaultLpSupplyInclFeesAfter", getU64Decoder()], ["vaultLpTotalAccumulatedFeesBefore", getU64Decoder()], ["vaultLpTotalAccumulatedFeesAfter", getU64Decoder()], ["vaultLpDeadWeightBefore", getU64Decoder()], ["vaultLpDeadWeightAfter", getU64Decoder()], ["vaultHighestAssetPerLpDecimalBitsBefore", getU128Decoder()], ["vaultHighestAssetPerLpDecimalBitsAfter", getU128Decoder()], ["withdrawnTs", getU64Decoder()], ]); } export function getInstantWithdrawVaultEventCodec(): FixedSizeCodec< InstantWithdrawVaultEventArgs, InstantWithdrawVaultEvent > { return combineCodec( getInstantWithdrawVaultEventEncoder(), getInstantWithdrawVaultEventDecoder(), ); }