Skip to content
Merged
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
13 changes: 13 additions & 0 deletions contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3042,6 +3042,19 @@ pub struct EventContractUpgraded {
#[contractimpl]
impl RwaMarketplace {

/// Return the admin address. Panics if the contract is not initialized.
pub fn get_admin(env: Env) -> Address {
env.storage()
.instance()
.get(&DataKey::Admin)
.expect("Contract not initialized: admin")
}

/// Return whether the contract has been initialized.
pub fn is_initialized(env: Env) -> bool {
env.storage().instance().has(&DataKey::Admin)
}

/// Upgrade the smart contract to a new version.
/// Only the admin can call this function.
pub fn upgrade(env: Env, new_wasm_hash: BytesN<32>) {
Expand Down
Loading