Execute flash loan with custom flash strategy
This is the safe entry point for all flash loans. The FlashExecutor:
pool - Pool address to borrow fromstrategy - User's strategy contract addressuser - Address of user initiating the flash loan (must sign transaction)amount0 - Amount of token0 to borrowamount1 - Amount of token1 to borrowdata - Arbitrary data passed to strategyStrategies receive user in FlashStrategyParams and can:
Ok(()) - Flash loan executed successfullyErr(Error) - Flash loan failed (insufficient repayment, stratfn execute_flash_loan(
env: soroban_sdk::Env,
pool: soroban_sdk::Address,
strategy: soroban_sdk::Address,
user: soroban_sdk::Address,
amount0: u128,
amount1: u128,
data: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>