TokenSwapFees class
Encapsulates all fee information and calculations for swap operations
- Inheritance
-
- Object
- LayoutSerializable
- TokenSwapFees
Constructors
- TokenSwapFees({required BigInt tradeFeeNumerator, required BigInt tradeFeeDenominator, required BigInt ownerTradeFeeNumerator, required BigInt ownerTradeFeeDenominator, required BigInt ownerWithdrawFeeNumerator, required BigInt ownerWithdrawFeeDenominator, required BigInt hostFeeNumerator, required BigInt hostFeeDenominator})
-
TokenSwapFees.fromJson(Map<
String, dynamic> json) -
Constructs a SPLTokenSwapInitSwapLayout instance from the given byte array.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostFeeDenominator → BigInt
-
Host trading fee denominator
final
- hostFeeNumerator → BigInt
-
Host fees are a proportion of the owner trading fees, sent to an
extra account provided during the trade.
Host trading fee numerator
final
- layout → StructLayout
-
The layout representing the structure of the object for serialization.
no setteroverride
- ownerTradeFeeDenominator → BigInt
-
Owner trade fee denominator
final
- ownerTradeFeeNumerator → BigInt
-
Owner trading fees are extra token amounts that are held inside the
token accounts during a trade, with the equivalent in pool tokens
minted to the owner of the program.
Owner trade fee numerator
final
- ownerWithdrawFeeDenominator → BigInt
-
The owner withdraw fee denominator.
final
- ownerWithdrawFeeNumerator → BigInt
-
Owner withdraw fees are extra liquidity pool token amounts that are
sent to the owner on every withdrawal.
Owner withdraw fee numerator
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tradeFeeDenominator → BigInt
-
Trade fee denominator
final
- tradeFeeNumerator → BigInt
-
Trade fees are extra token amounts that are held inside the token
accounts during a trade, making the value of liquidity tokens rise.
Trade fee numerator
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → Map< String, dynamic> -
Serializes the object to a map.
override
-
toBytes(
) → List< int> -
Converts the object to bytes using Borsh serialization.
inherited
-
toHex(
) → String -
Converts the object to a hexadecimal string.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- staticLayout → StructLayout
-
The layout structure for creating a token swap.
final