Contract 4041cbdd8d7d1b700e6b24afb0b40a59aef67f36459782dbd32da381e02a63a3

← Back to Index 📥 Download WASM

Meta

authors Aha Labs <hello@ahalabs.dev>
binver 0.1.0
name registry
rssdkver 22.0.4#1d4afb3b981a4f4b2bbc19f0ce38af85c4ab316a
rsver 1.86.0

Instances

  • CC3SILHAJ5O75KMSJ5J6I5HV753OTPWEVMZUYHS4QEM2ZTISQRAOMMF4

Interface

Get current admin

fn admin_get(env: soroban_sdk::Env) -> Option

Transfer to new admin Should be called in the same transaction as deploying the contract to ensure that a different account try to become admin

fn admin_set(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Admin can upgrade the contract with given hash.

fn upgrade(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)

Constructor to set the admin

fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Fetch the hash of a Wasm binary from the registry

fn fetch_hash(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    version: Option,
) -> Result, soroban_sdk::Error>

Most recent version of the published Wasm binary

fn current_version(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
) -> Result

Publish a binary. If contract had been previously published only previous author can publish again

fn publish(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    author: soroban_sdk::Address,
    wasm: soroban_sdk::Bytes,
    version: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>

Publish a binary. If contract had been previously published only previous author can publish again

fn publish_hash(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    author: soroban_sdk::Address,
    wasm_hash: soroban_sdk::BytesN<32>,
    version: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>

Deploys a new published contract returning the deployed contract's id. If no salt provided it will use the current sequence number.

fn deploy(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    version: Option,
    contract_name: soroban_sdk::String,
    admin: soroban_sdk::Address,
    init: Option>,
) -> Result

Look up the contract id of a deployed contract

fn fetch_contract_id(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
) -> Result

Skips the publish step to deploy a contract directly, keeping the name

fn dev_deploy(
    env: soroban_sdk::Env,
    name: soroban_sdk::String,
    wasm: soroban_sdk::Bytes,
    upgrade_fn: Option,
) -> Result

Upgrades a contract by calling the upgrade function. Default is 'upgrade' and expects that first arg is the corresponding wasm hash

fn upgrade_contract(
    env: soroban_sdk::Env,
    name: soroban_sdk::String,
    wasm_name: soroban_sdk::String,
    version: Option,
    upgrade_fn: Option,
) -> Result

Imports

WebAssembly Text (WAT) ▶