Module stellar_fee_forwarder

Source
Expand description

FeeForwarder Service for Soroban Gas Abstraction

This module provides functionality to build and manage transactions using the FeeForwarder contract for gas abstraction on Soroban.

The FeeForwarder contract enables fee abstraction by allowing users to pay relayers in tokens instead of native XLM. It atomically:

  1. Collects fee payment from user
  2. Forwards the call to the target contract

§Authorization Flow

User signs authorization for fee_forwarder.forward() with sub-invocations:

  • fee_token.approve(user, fee_forwarder, max_fee_amount, expiration_ledger)
  • target_contract.target_fn(target_args) (if target requires auth)

Structs§

FeeForwarderParams
Parameters for building a FeeForwarder transaction
FeeForwarderService
Service for building FeeForwarder transactions

Enums§

FeeForwarderError
Errors that can occur in FeeForwarder operations

Constants§

DEFAULT_VALIDITY_SECONDS
Default validity duration for gas abstraction authorizations (2 minutes).