Contract 8102312a3412b5df4a23761bbec7b83bfe6c4eb553b5593bf5083d0c8c185268

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdkver 27.0.6#60926a20d1f9f0a669d5fe551636f42a1302f0c0
rsver 1.93.1

Instances

  • CCKLZKNMLVIZECETURTKGU5GD6V4PZDAV6CCDZ3BFCJYVDCTZ2AF2FFH

Interface

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,
)

Imports

WebAssembly Text (WAT) ▶