Contract 053d3a283dc2fdd605f53420e1f169adc0036b8edbcab16ef38139637ccc5627

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.96.0

Instances

  • CBXX465FRKWQMWPPX3YDEBHPHC2K2L55VWLCPZCRRZB77ZVDABFC33YY

Interface

fn get_user(env: soroban_sdk::Env, addr: soroban_sdk::Address) -> Option

Standard self-paid registration. The caller submits and pays for their own transaction (or it can still be fee-bumped transparently by a sponsor).

fn register_user(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    username: soroban_sdk::String,
    encryption_pubkey: soroban_sdk::Bytes,
    metadata_ipfs: soroban_sdk::Bytes,
)

Number of actions a sponsor has paid for through this contract.

fn get_sponsored_count(env: soroban_sdk::Env, sponsor: soroban_sdk::Address) -> u32

Fee-sponsored ("gasless") registration.

Intended to be submitted inside a Stellar fee-bump transaction whose fee source is sponsor, so the new user spends no XLM.

  • sponsor.require_auth() — the sponsor explicitly consents to backing this action, so on-chain sponsorship accounting cannot be forged.
  • caller.require_auth() — the user still authorizes their own profile write.
fn register_user_sponsored(
    env: soroban_sdk::Env,
    sponsor: soroban_sdk::Address,
    caller: soroban_sdk::Address,
    username: soroban_sdk::String,
    encryption_pubkey: soroban_sdk::Bytes,
    metadata_ipfs: soroban_sdk::Bytes,
)

Imports

WebAssembly Text (WAT) ▶