/** * 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 DepositVaultEvent = { user: Address; userAmountAssetDeposited: bigint; userAmountLpMinted: bigint; vault: Address; vaultAssetMint: Address; vaultAssetTotalValueBefore: bigint; vaultAssetTotalValueAfter: bigint; vaultLpSupplyInclFeesBefore: bigint; vaultLpSupplyInclFeesAfter: bigint; vaultLpTotalAccumulatedFeesBefore: bigint; vaultLpTotalAccumulatedFeesAfter: bigint; vaultLpDeadWeightBefore: bigint; vaultLpDeadWeightAfter: bigint; vaultHighestAssetPerLpDecimalBitsBefore: bigint; vaultHighestAssetPerLpDecimalBitsAfter: bigint; depositedTs: bigint; }; export type DepositVaultEventArgs = { user: Address; userAmountAssetDeposited: number | bigint; userAmountLpMinted: number | bigint; vault: Address; vaultAssetMint: Address; 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; depositedTs: number | bigint; }; export function getDepositVaultEventEncoder(): FixedSizeEncoder { return getStructEncoder([ ["user", getAddressEncoder()], ["userAmountAssetDeposited", getU64Encoder()], ["userAmountLpMinted", getU64Encoder()], ["vault", getAddressEncoder()], ["vaultAssetMint", getAddressEncoder()], ["vaultAssetTotalValueBefore", getU64Encoder()], ["vaultAssetTotalValueAfter", getU64Encoder()], ["vaultLpSupplyInclFeesBefore", getU64Encoder()], ["vaultLpSupplyInclFeesAfter", getU64Encoder()], ["vaultLpTotalAccumulatedFeesBefore", getU64Encoder()], ["vaultLpTotalAccumulatedFeesAfter", getU64Encoder()], ["vaultLpDeadWeightBefore", getU64Encoder()], ["vaultLpDeadWeightAfter", getU64Encoder()], ["vaultHighestAssetPerLpDecimalBitsBefore", getU128Encoder()], ["vaultHighestAssetPerLpDecimalBitsAfter", getU128Encoder()], ["depositedTs", getU64Encoder()], ]); } export function getDepositVaultEventDecoder(): FixedSizeDecoder { return getStructDecoder([ ["user", getAddressDecoder()], ["userAmountAssetDeposited", getU64Decoder()], ["userAmountLpMinted", getU64Decoder()], ["vault", getAddressDecoder()], ["vaultAssetMint", getAddressDecoder()], ["vaultAssetTotalValueBefore", getU64Decoder()], ["vaultAssetTotalValueAfter", getU64Decoder()], ["vaultLpSupplyInclFeesBefore", getU64Decoder()], ["vaultLpSupplyInclFeesAfter", getU64Decoder()], ["vaultLpTotalAccumulatedFeesBefore", getU64Decoder()], ["vaultLpTotalAccumulatedFeesAfter", getU64Decoder()], ["vaultLpDeadWeightBefore", getU64Decoder()], ["vaultLpDeadWeightAfter", getU64Decoder()], ["vaultHighestAssetPerLpDecimalBitsBefore", getU128Decoder()], ["vaultHighestAssetPerLpDecimalBitsAfter", getU128Decoder()], ["depositedTs", getU64Decoder()], ]); } export function getDepositVaultEventCodec(): FixedSizeCodec< DepositVaultEventArgs, DepositVaultEvent > { return combineCodec( getDepositVaultEventEncoder(), getDepositVaultEventDecoder(), ); }