IFastBridgeInterceptor
Functions
bridgeWithInterception
Bridges tokens with automatic destination amount adjustment based on actual sent amount. For ERC20 tokens: Requires token approval to this contract (not FastBridge). For ETH: Send the desired ETH amount via msg.value. Will revert if amounts differ by more than 1% or an invalid token is provided.
Handles token transfers/approvals and forwards calls to FastBridge with adjusted destination amounts.
function bridgeWithInterception(
    IFastBridge.BridgeParams memory params,
    InterceptorParams memory interceptorParams
)
    external
    payable;
Parameters
| Name | Type | Description | 
|---|---|---|
| params | IFastBridge.BridgeParams | Bridge parameters with the actual amount to bridge. | 
| interceptorParams | InterceptorParams | Original quote parameters used for price calculation. | 
Errors
FBI__OriginAmountOutOfRange
Error thrown when the origin amount is outside the allowed range (±1% of quote).
error FBI__OriginAmountOutOfRange(uint256 originAmount, uint256 quoteOriginAmount);
FBI__TokenNotContract
Error thrown when the token address provided has no code (is not a contract).
error FBI__TokenNotContract(address token);
Structs
InterceptorParams
Parameters for adjusting a bridge quote on the fly.
struct InterceptorParams {
    address fastBridge;
    uint256 quoteOriginAmount;
}