Contract d1d4e69b4f3b9c14382b5e8cfbc081afefb5f5306769339a7482acebdd5358a1

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
home_domain rgstry.xyz
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.93.0
source_repo github:stellar-registry/contracts

Instances

  • CA4RR2L5P76IXTIHWNWBJYP2HDAD2NWURI67KTWVBMLSRXG6LQI22ZVR
  • CBQ64IZGRNVO7DMSKRJC2C2GKRVFYLVDHL7PYKZ7Y4KLGN47A5QSHZOW
  • CCONBVT5MZRB73VCSWJBILL2A3LDLBFKXUS5FM2LCFOVQX7SXVLZVCMN
  • CD3IHPEWI6VGKCJ4IYMDAKNGCJSNG2DVIM4OAKCHP7RJIBRK4E36VEIR
  • CDGXRABY27IUZ5Q5TCA3ALKMJL3QQYUHSD2K5M3APXPSJLCDPVZBZ6OJ
  • CDOPSNPDQZSF65CBM7OEU3IJTX7FFTGLXGEUWJWWLEJQP6ASES2B7VRH
  • CDU4M3LDIOUJJ5F3YXKJ4EJEP5VPRPG6N2LJ5HOQIMN7MNGL3NS3EGUY

Interface

fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Deploys a new published contract returning the deployed contract's id and register the contract name. If no salt provided it will use the current sequence number. If no deployer is provided it uses the contract as the deployer Note: deployer is an advanced feature. If you need to resolve contract IDs deterministically without RPC calls, you can set a known Deployer account, which will be used as the --salt.

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

The manager account which if set authorizes initial publishes and claiming a contract id

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

Publish a binary. Contract uploads bytes ensuring hash is correct. 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>

Upgrades the contract to a new hash. Admin Only.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

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

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>

Admin can set the new manager

fn set_manager(env: soroban_sdk::Env, new_manager: soroban_sdk::Address)

Publish a hash of 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>
  • admin: account which will: upgrade this Registry itself; add, set, or remove manager
  • manager: optional. If set, makes this a managed registry, meaning publish, register_contract, & deploy must be approved by the manager before caller's account is considered trusted for that contract/wasm name.
  • root: if None, this registry is the root registry — it has no namespace, other registries (like the unverified one) are registered in it, and the constructor auto-deploys the unverified registry. If Some, this is a subregistry that defers to the given root for resolving sibling subregistry names during cross-registry deploys.
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    manager: Option,
    root: Option,
) -> Result<(), soroban_sdk::Error>

Flag contract, marking contract as compromised or un-marking it as being compromised

fn flag_contract(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
    flagged: bool,
) -> Result<(), soroban_sdk::Error>

Process up to limit pending batch entries, registering each contract. Callable by anyone. Returns the number of contracts processed. Call repeatedly to iterate through all entries.

fn process_batch(env: soroban_sdk::Env, limit: u32) -> Result

Stage a batch of existing contracts for registration. Requires manager auth if manager is set, otherwise admin auth. Each entry is (contract_name, contract_address, owner). The entire batch is stored in a single write after validation.

fn batch_register(
    env: soroban_sdk::Env,
    contracts: soroban_sdk::Vec<
        (soroban_sdk::String, soroban_sdk::Address, soroban_sdk::Address),
    >,
) -> Result<(), soroban_sdk::Error>

Deploys a new published contract returning the deployed contract's id but does not register the contract name. Otherwise if no salt provided it will use a random one.

fn deploy_unnamed(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    version: Option,
    init: Option>,
    salt: soroban_sdk::BytesN<32>,
    deployer: soroban_sdk::Address,
) -> Result

Admin can remove manager

fn remove_manager(env: soroban_sdk::Env)

Most recent version of the published Wasm binary

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

Rename a registered contract. Requires current owner auth, or manager auth if manager is set.

fn rename_contract(
    env: soroban_sdk::Env,
    old_name: soroban_sdk::String,
    new_name: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>

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

Look up the contract id of a deployed contract

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

Register a name for an existing contract which wasn't deployed by the registry

fn register_contract(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
    contract_address: soroban_sdk::Address,
    owner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Look up the owner of a deployed contract

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

Fetch the hash and version of a Wasm binary from the registry and bump TTL This is used for cross contract calls (xcc)

fn xcc_hash_and_version(
    env: soroban_sdk::Env,
    wasm_name: soroban_sdk::String,
    version: Option,
) -> Result<(soroban_sdk::String, soroban_sdk::BytesN<32>), soroban_sdk::Error>

Invokes contract with the given contract name, using given function name and arguments

fn proxy_invoke_contract(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
    contract_fn: soroban_sdk::Symbol,
    args: soroban_sdk::Vec,
) -> Result

Update the owner of a registered contract. Requires current owner auth, or manager auth if manager is set.

fn update_contract_owner(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
    new_owner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Deploys a new published contract returning the deployed contract's id and register the contract name. The subregistry passed is where the wasm_name is located. If no salt provided it will use the current sequence number. If no deployer is provided it uses the contract as the deployer Note: deployer is an advanced feature. If you need to resolve contract IDs deterministically without RPC calls, you can set a known Deployer account, which will be used as the --salt.

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

Update the contract address of a registered contract. Requires current owner auth, or manager auth if manager is set.

fn update_contract_address(
    env: soroban_sdk::Env,
    contract_name: soroban_sdk::String,
    new_address: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶