fn pause(env: soroban_sdk::Env, paused: bool) -> Result<(), DikeError>
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), DikeError>
fn set_admin(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), DikeError>
fn is_creator(env: soroban_sdk::Env, creator: soroban_sdk::Address) -> bool
fn set_creator(
env: soroban_sdk::Env,
creator: soroban_sdk::Address,
approved: bool,
) -> Result<(), DikeError>
fn set_modules(
env: soroban_sdk::Env,
registry: soroban_sdk::Address,
tokens: soroban_sdk::Address,
vault: soroban_sdk::Address,
amm: soroban_sdk::Address,
fee_manager: soroban_sdk::Address,
) -> Result<(), DikeError>
fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
governance: soroban_sdk::Address,
min_liquidity: i128,
min_expiry_duration: u64,
)
Counter-divergence guarantee: NextMarketId is bumped LAST, after both
registry.register_market and amm.create_pool succeed. Any failure
in those cross-contract calls propagates as a trap, causing Soroban to
revert the entire transaction write-set. Registry, AMM, and factory
counters therefore can never diverge across a committed transaction —
either all three increment together, or none of them do.
fn create_market(
env: soroban_sdk::Env,
config: MarketConfig,
initial_liquidity: i128,
opening_price_bps: u32,
) -> Result
Returns the next market-id the factory will assign. Used in tests to verify the counter is unchanged after a failed create_market call.
fn next_market_id(env: soroban_sdk::Env) -> u64
fn set_collateral(
env: soroban_sdk::Env,
collateral: soroban_sdk::Address,
supported: bool,
) -> Result<(), DikeError>
Recovery path for a misconfigured governance pointer set at
construction (used by require_governance/require_timelock — must
be the actual dike-governance contract address, not an EOA).
Admin-gated, matching set_admin's rotation model.
fn set_governance(
env: soroban_sdk::Env,
governance: soroban_sdk::Address,
) -> Result<(), DikeError>
fn set_creator_by_timelock(
env: soroban_sdk::Env,
creator: soroban_sdk::Address,
approved: bool,
) -> Result<(), DikeError>