Contract 153ac7ef984651acf6d11b7caf01051370c44a99b37cf686d878564b8b9dbb24

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CCR4Y2DLRJCQPGQJ2UNVZEOFANZEJC5NK6X6VGLP7PCVYTAQ54G4XSL2

Interface

Initialize the registry with an admin address.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
) -> Result<(), RegistryError>

Get a specific service by ID.

fn get_service(env: soroban_sdk::Env, id: u64) -> Result

Update the price of a service. Only the owner can do this.

fn update_price(
    env: soroban_sdk::Env,
    id: u64,
    new_price: i128,
) -> Result<(), RegistryError>

List all active services.

fn list_services(env: soroban_sdk::Env) -> soroban_sdk::Vec

Register a new service. Anyone can register. Owner is the payout address. example shows agents how to call this service (e.g. "/call/1?latitude=51.5&longitude=-0.1").

fn register_service(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    name: soroban_sdk::Symbol,
    description: soroban_sdk::String,
    endpoint: soroban_sdk::String,
    example: soroban_sdk::String,
    price_stroops: i128,
) -> Result

Deactivate a service. Owner or admin can do this.

fn deactivate_service(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    id: u64,
) -> Result<(), RegistryError>

Imports

WebAssembly Text (WAT) ▶