An enterprise-grade, security-hardened Real-World Asset (RWA) tokenization platform engineered natively for the Casper Network using the Odra Smart Contract Framework. This repository implements a robust asset tokenization layer combined with native x402 Micropayments capability, allowing autonomous AI agents to sign, execute, and route tokenized property balances via cryptographic off-chain signatures with strict replay protection.
This platform is architected from the ground up to support the tokenization of heavy physical assets (e.g., RealEstate) while maintaining tight security bounds for multi-agent autonomous execution.
- Automated x402 Micropayments Engine: Implements advanced
transfer_with_authorizationparadigms. Autonomous agents act as secure facilitators, parsing signed allocations without requiring direct on-chain allowance gas overhead or private key vulnerability exposure. - Hardened Security Matrix & Nonce Tracking: Features strict cryptographic nonce mapping (
used_nonces) coupled with rigid unix block-time validation controls (valid_after/valid_before) to completely mathematically eliminate transaction-replay vectors. - Strict Decimals & Numerical Precision: Engineered with exact
u64constraint limits matching Casper's native serialization protocols, alongside a custom-tailored configuration framework ensuring zero compile-time or floating-point dependency bloat.
.
├── .cargo/
│ └── config.toml # Rust compiler optimization settings
├── bin/
│ ├── build_contract.rs # WASM contract build entrypoint
│ ├── build_schema.rs # Contract schema generator
│ ├── cli.rs # Deployment CLI
│ └── deploy.rs # Casper Testnet deployment pipeline
├── client/
│ ├── src/
│ │ ├── config.ts # Client configuration
│ │ ├── constants.ts # Shared project constants
│ │ ├── eip712-signer.ts # Casper EIP-712 signing engine
│ │ ├── index.ts # Client entrypoint
│ │ ├── types.ts # Shared TypeScript types
│ │ ├── utils.ts # Utility helpers
│ │ └── x402-client.ts # x402 payment workflow implementation
│ ├── package.json # Node.js client dependencies
│ └── package-lock.json
├── src/
│ ├── flipper.rs # Contract storage host module
│ └── lib.rs # RWA token smart contract (CEP-18 + x402 authorization)
├── tests/ # Smart contract integration tests
├── wasm/ # Compiled WASM artifacts
├── build.rs # Odra build orchestration
├── Cargo.toml # Rust workspace configuration
├── Cargo.lock
├── LICENSE
└── README.md
- Smart Contract Layer: Odra Framework (Rust bare-metal target compilation)
- On-Chain Target Ecosystem: Casper Network (Testnet Ledger runtime)
- Micropayment Standard Architecture: x402 Facilitator Matrix Framework
- Validation Engine:
casper-engine-test-support(Rigid local VM state assertion testing) - Compiler Optimizations: Binaryen optimization tools integration
It's recommended to install cargo-odra first.
To compile standard smart contract modules:
cargo odra buildTo build a wasm file, you need to pass the -b parameter. The result files will be placed in ${project-root}/wasm directory.
cargo odra build -b casperTo run test on your local machine, you can basically execute the command:
cargo odra testTo test actual wasm files against a backend, you need to specify the backend passing -b argument to cargo-odra.
cargo odra test -b casperTo initialize local configurations and execute the automated TypeScript/Rust runtime agent mesh:
# Navigate to client layer
cd client
# Spin up environment loop natively
npm install
npm run build
npm start- Cryptographic Replay Prevention: Nonces are bound to explicit address mapping matrices. Once an asset transfer signature has been processed, the state is locked permanently on-chain.
- Rigid Sandbox Isolation:
.gitignorerules aggressively enforce context protection blocks preventing the leakage of private keys (secret_key.pem,wallet.json),.pemfile streams, or heavy host compilation caches into the global stream.
Engineered and Hardened by Shah Wali (shahwali-dev) for Casper Agentic Buildathon 2026.