Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ let (consensus_reached, outcome) = oracle_client.check_consensus(&market_id);
&market_id,
&creator,
&factory_address, // ← Cross-contract reference
&admin_address, // ← Creator or factory admin (can cancel market)
&usdc_address,
&oracle_address, // ← Cross-contract reference
&closing_time,
Expand Down
8 changes: 8 additions & 0 deletions contracts/contracts/boxmeout/src/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ impl MarketFactory {
.unwrap_or(0)
}

/// Get admin address (for market cancel authorization)
pub fn get_admin(env: Env) -> Address {
env.storage()
.persistent()
.get(&Symbol::new(&env, ADMIN_KEY))
.expect("Admin not set")
}

/// Get treasury address
pub fn get_treasury(env: Env) -> Address {
env.storage()
Expand Down
Loading
Loading