Pays to through the splitter: the savings share of amount goes to
to's chosen yield source, the rest is credited to the spendable balance.
fn pay(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
fn usdc(env: soroban_sdk::Env) -> soroban_sdk::Address
fn owner(env: soroban_sdk::Env) -> Option
fn pause(env: soroban_sdk::Env)
fn vault(env: soroban_sdk::Env) -> soroban_sdk::Address
fn paused(env: soroban_sdk::Env) -> bool
fn unpause(env: soroban_sdk::Env)
Locks savings withdrawals until until; a lock can only be extended.
fn set_lock(env: soroban_sdk::Env, user: soroban_sdk::Address, until: u64)
fn set_split(env: soroban_sdk::Env, user: soroban_sdk::Address, bps: u32)
fn account_of(env: soroban_sdk::Env, user: soroban_sdk::Address) -> Account
fn blend_pool(env: soroban_sdk::Env) -> soroban_sdk::Address
fn __constructor(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
usdc: soroban_sdk::Address,
vault: soroban_sdk::Address,
blend_pool: soroban_sdk::Address,
blend_reserve_index: u32,
soroswap_router: soroban_sdk::Address,
soroswap_factory: soroban_sdk::Address,
soroswap_pair: soroban_sdk::Address,
xlm: soroban_sdk::Address,
default_yield_target: YieldTarget,
)
fn soroswap_pair(env: soroban_sdk::Env) -> soroban_sdk::Address
Pays to with any token that has a Soroswap route to USDC: pulls
amount_in of token_in from from, swaps it along path for
USDC, then splits the received USDC exactly like pay. The swap is
a plain call - any failure reverts the whole payment, since unlike a
yield-source outage there is no USDC to degrade to.
fn pay_with_token(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
token_in: soroban_sdk::Address,
amount_in: i128,
min_usdc_out: i128,
path: soroban_sdk::Vec,
to: soroban_sdk::Address,
)
fn withdraw_spend(env: soroban_sdk::Env, user: soroban_sdk::Address, amount: i128)
Switches which protocol user's future savings earn yield in. Only
allowed at a zero balance, since the sources' shares are not
interchangeable and withdrawing first keeps the accounting simple.
fn set_yield_target(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
target: YieldTarget,
)
Redeems savings shares from user's yield source and sends the
resulting USDC to them.
fn withdraw_savings(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
shares: i128,
) -> i128