Smart Contracts

On-chain settlement on casper-test

AgentVault deploys Odra contract packages to Casper testnet: Escrow for job funding, Attestation for RWA reputation, and Vault for bounded agent session keys.

Deployed packages

Package hashes are configured for the deployment environment. The dashboard normalizes the hash- prefix automatically. Canonical source: contracts/agentvault-core/resources/casper-test-contracts.toml.

ContractConfigurationEntry points
EscrowNEXT_PUBLIC_ESCROW_PACKAGE_HASHinit, post_job, verify_and_release
AttestationNEXT_PUBLIC_ATTESTATION_PACKAGE_HASHinit, publish, update_reputation, get_reputation
VaultNEXT_PUBLIC_VAULT_PACKAGE_HASHinit, deposit, withdraw, authorize_agent, revoke_agent, agent_transfer

Escrow module

Manages job-scoped payment state. post_job stores recipient and amount for marketplace listings. verify_and_release is owner-gated and flips the verified flag before completing payout.

Attestation module

Records compliance metadata for RWA workflows. publish captures issuer, data_hash, block timestamp, and initial_score. update_reputation is issuer-only — non-issuer callers revert with NotIssuer.

Vault module

Session-key treasury. Owner deposits CSPR and authorizes agent accounts with spend cap, period window, action bitmask, and expiry. Agents call agent_transfer under those checks; owner can revoke immediately.

Transaction payment

Contract package calls reserve 5_000_000_000 motes (5 CSPR) per transaction. Wallets need sufficient testnet balance for multiple actions.

Trace transactions

Every on-chain dashboard action returns a transaction hash on success with a copy button and testnet.cspr.live explorer link. Record those hashes in docs/TESTNET.md when documenting a deployment.