/** * 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, getStructDecoder, getStructEncoder, getU128Decoder, getU128Encoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type WithdrawVaultEvent = { user: Address; 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 WithdrawVaultEventArgs = { user: Address; 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 getWithdrawVaultEventEncoder(): FixedSizeEncoder { return getStructEncoder([ ["user", getAddressEncoder()], ["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 getWithdrawVaultEventDecoder(): FixedSizeDecoder { return getStructDecoder([ ["user", getAddressDecoder()], ["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 getWithdrawVaultEventCodec(): FixedSizeCodec< WithdrawVaultEventArgs, WithdrawVaultEvent > { return combineCodec( getWithdrawVaultEventEncoder(), getWithdrawVaultEventDecoder(), ); }