Skip to Content
KryptWarden Developers
Smart contracts

Overview

The two Soroban contracts, how they relate, and how to call them.

ContractRoleTestnet ID
KryptWardenFactoryDeploys one wallet per call, tracks wallets by ownerCBZF662RUYLPS3UCSRQ2XJHMF6YMFZKHBUXHAIDRYNDAAUXWAGEV5XPR
KryptWardenWalletHolds USDC, stores agents and holds, enforces policy in __check_authOne per owner, e.g. the demo wallet CBRS…4NVO

Both are written in Rust with soroban-sdk and OpenZeppelin Stellar Contracts v0.8.0. Source is in contracts/ in the repo.

Who can call what

CallerFunctions
Ownerregister_agent, update_policy, pause_agent, resume_agent, revoke_agent, approve_hold, deny_hold, withdraw, pause, unpause, upgrade, transfer_ownership
Agent signature (submitted by anyone, usually the relayer)request_hold, record_rejected_attempt, and USDC transfers authorised through __check_auth
Anyoneexpire_hold and every get_* read

Calling from the Stellar CLI

Reads are free simulations:

stellar contract invoke --network testnet --source any-funded-identity \
  --id CBRSOOZPMVB3SX6LPRG6ESCRBOPP6G4OZHVIQUNCVRQPNMCUE5BB4NVO \
  -- get_unreserved_balance

Agent keys are passed to contract functions as raw 32-byte hex (BytesN<32>), not as G… strings. Convert with StrKey.decodeEd25519PublicKey(g) in @stellar/stellar-sdk; keygen also writes KW_AGENT_PUBLIC_KEY_HEX.

Verifying the build

Release WASMs are built reproducibly in CI and attested with SEP-55. Compare a wallet's WASM hash (on stellar.expert, or get_wallet_wasm_hash on the factory) with the hash on the matching GitHub release.

On this page