caelum0x 5cf86893e3 feat(contracts): deploy Cred402 Odra contracts to Casper Testnet (Casper 2.0)
Migrate the contract suite to Odra 2.x (builds on the Casper 2.0 ABI; fixes the
1.x nightly/edition2024 toolchain deadlock) and deploy 9 contracts live to
casper-test via the Odra livenet deployer:

  AgentRegistry · X402ReceiptRegistry · RWAEvidenceRegistry · RWAAssetRegistry
  ReputationEngine · AgentCreditPool · RiskPolicyManager · AgentPassport · DisputeCourt

- contracts: odra "2", no_std headers, build.rs (odra-build), per-crate Odra.toml +
  build_contract/livenet bins; pinned nightly-2025-01-15 for reproducible wasm.
- tooling: scaffold_livenet.py, deploy_all_testnet.sh, deploy_one.mjs.
- deploys.testnet.json: live manifest; README: on-chain contract hashes.
- Deployer key kept out of git (.secrets/ gitignored); wasm artifacts gitignored.

Verified on-chain: AgentRegistry ContractPackage present in global state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 02:34:49 +03:00

19 lines
766 B
Rust

//! Livenet deployer for AgentRegistry — deploys the real contract to Casper
//! Testnet via Odra's own host API (correct install args, signing, settlement).
//!
//! ODRA_CASPER_LIVENET_SECRET_KEY_PATH=../../.secrets/testnet_deployer.pem \
//! ODRA_CASPER_LIVENET_NODE_ADDRESS=https://node.testnet.casper.network/rpc \
//! ODRA_CASPER_LIVENET_CHAIN_NAME=casper-test \
//! cargo run --bin livenet --features livenet
use agent_registry::AgentRegistry;
use odra::host::{Deployer, NoArgs};
use odra::prelude::Addressable;
use odra_casper_livenet_env::env;
fn main() {
let env = env();
env.set_gas(400_000_000_000u64);
let contract = AgentRegistry::deploy(&env, NoArgs);
println!("AGENT_REGISTRY_ADDRESS={}", contract.address().to_string());
}