Module fee

Source
Expand description

Fee structures for vault operations.

Portable across NEAR and Soroban.

This module provides two fee representation approaches:

  • Fee<T> / Fees<T>: Generic types with string recipients for chain flexibility
  • FeeSlot / FeesSpec: Spec-compliant types with fixed-size Address recipients

Use Fee<Wad> for NEAR where AccountId is naturally a string. Use FeeSlot when strict spec conformance with 32-byte addresses is required.

Structsยง

Fee
A fee configuration with a rate and recipient.
FeeSlot
A fee slot with a WAD-scaled rate and 32-byte address recipient.
Fees
Collection of fees for a vault.
FeesSpec
Spec-compliant fee collection using FeeSlot with 32-byte addresses.