Emergency function to pause all order creation and settlements.
admin: Must authorize the pause("Paused",) when contract is pausedfn pause(env: soroban_sdk::Env) -> Result<(), ContractError>
Resumes normal contract operations after a pause.
admin: Must authorize the unpause("Unpaused",) when contract is unpausedfn unpause(env: soroban_sdk::Env) -> Result<(), ContractError>
true if contract operations are pausedfalse if contract is operationalfn is_paused(env: soroban_sdk::Env) -> bool
Sets up initial protocol configuration with admin, treasury, and relayer addresses.
admin: Must authorize initializationtreasury: Address to receive protocol feesrelayer_address: Authorized address for settlement operationsfn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
treasury: soroban_sdk::Address,
relayer_address: soroban_sdk::Address,
)
Currently hardcoded to only support USDC. Can be extended for multi-token support.
true if token is supported for ordersfalse if token is not supportedfn is_token_supported(env: soroban_sdk::Env, token: soroban_sdk::Address) -> bool
Updates the settings manager contract's WASM code.
admin: Must authorize the upgradefn upgrade_lp_manager(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
fn get_relayer_address(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_treasury_address(env: soroban_sdk::Env) -> soroban_sdk::Address
Updates treasury or relayer addresses with proper validation.
admin: Must authorize the changewhat: Type of address to update (Treasury or Aggregator/Relayer)value: New address valuefn update_protocol_address(
env: soroban_sdk::Env,
what: ProtocolAddressType,
value: soroban_sdk::Address,
) -> Result<(), ContractError>