Constructor for the Collective contract
admin - The admin addressjoin_fee - Fee to join the collective (in stroops)mint_fee - Fee to publish a file (in stroops)token - The payment token address (e.g., XLM)reward - Opus reward per file (in Opus tokens)split - Percentage of Opus reward to collective treasury (0-30, default 10)fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
join_fee: u32,
mint_fee: u32,
token: soroban_sdk::Address,
reward: u32,
split: u32,
)
fn fund_contract(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
fund_amount: u32,
) -> i128
fn join(env: soroban_sdk::Env, caller: soroban_sdk::Address)
fn withdraw(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
recipient: soroban_sdk::Address,
) -> Result
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::Symbol
fn join_fee(env: soroban_sdk::Env) -> i128
fn mint_fee(env: soroban_sdk::Env) -> i128
fn opus_reward(env: soroban_sdk::Env) -> i128
Returns the current Opus split percentage (0-30) This is the percentage of Opus rewards that go to the collective treasury
fn opus_split(env: soroban_sdk::Env) -> u32
fn member_paid(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> u32
fn opus_address(env: soroban_sdk::Env) -> soroban_sdk::Address
fn is_member(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> bool
fn remove(
env: soroban_sdk::Env,
admin_caller: soroban_sdk::Address,
member_to_remove: soroban_sdk::Address,
) -> bool
fn deploy_node_token(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
name: soroban_sdk::String,
descriptor: soroban_sdk::String,
) -> soroban_sdk::Address
fn deploy_ipfs_token(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
name: soroban_sdk::String,
ipfs_hash: soroban_sdk::String,
file_type: soroban_sdk::String,
gateways: soroban_sdk::String,
ipns_hash: Option,
) -> soroban_sdk::Address
fn publish_file(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
publisher: soroban_sdk::String,
ipfs_hash: soroban_sdk::String,
)
fn publish_encrypted_share(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
publisher: soroban_sdk::String,
recipient: soroban_sdk::String,
ipfs_hash: soroban_sdk::String,
)
Sets the OPUS token contract address and mints initial allocation to the caller.
The collective contract must be set as the admin of the OPUS token contract
before calling this function. This can be done by calling set_admin on the
OPUS token contract with the collective contract's address.
fn set_opus_token(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
opus_contract_id: soroban_sdk::Address,
initial_alloc: u32,
) -> bool
fn is_launched(env: soroban_sdk::Env) -> bool
fn update_join_fee(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_fee: u32,
) -> i128
fn update_mint_fee(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_fee: u32,
) -> i128
fn update_opus_reward(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_reward: u32,
) -> i128
Updates the Opus split percentage (admin only)
new_split - New split percentage (0-30)fn update_opus_split(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_split: u32,
) -> u32
fn add_admin(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
new_admin: soroban_sdk::Address,
) -> bool
fn is_admin(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> bool
fn get_admin_list(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn remove_admin(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
admin_to_remove: soroban_sdk::Address,
) -> bool