Returns the two recipients and their shares, in constructor order.
fn config(
env: soroban_sdk::Env,
) -> ((soroban_sdk::Address, u32), (soroban_sdk::Address, u32))
Sends the full balance of token to the two recipients.
Any account can call this function. The function does not read the caller and does not require the authorization of the caller.
The recipient with the larger share gets
floor(balance * bps / 10000). The other recipient gets the rest.
The rounding remainder, which is smaller than one unit of the token,
always goes to the recipient with the smaller share. If the two shares
are equal, the remainder goes to recipient_b.
Returns the two amounts in constructor order.
fn withdraw(env: soroban_sdk::Env, token: soroban_sdk::Address) -> (i128, i128)
Writes the two recipients and their shares. This runs one time, at deployment. After this function, the configuration is permanent.
fn __constructor(
env: soroban_sdk::Env,
recipient_a: soroban_sdk::Address,
bps_a: u32,
recipient_b: soroban_sdk::Address,
bps_b: u32,
)