Thaw is a liquid staking protocol on Casper Network using the Odra framework.
thaw/
├── contracts/ # Odra smart contracts
│ ├── src/ # Contract source code
│ ├── tests/ # Contract tests
│ ├── wasm/ # Compiled WASM files
│ └── Odra.toml # Odra configuration
├── frontend/ # Next.js frontend
├── keys/ # Wallet keys for deployment
└── prompts/ # Strategy prompts
ThCsprToken- Liquid staking token (thCSPR)ThawCore- Core staking/unstaking logic
| Network | Chain Name | RPC Endpoint | Use Case |
|---|---|---|---|
| Localnet | casper-net-1 |
http://localhost:11101/rpc |
Fast iteration, free |
| Testnet | casper-test |
https://node.testnet.casper.network/rpc |
Pre-production |
| Mainnet | casper |
https://node.mainnet.casper.network/rpc |
Production |
The shared localnet is at ../localnet/. All projects share this instance.
Check if running:
docker ps --filter "name=mynctl" --format "{{.Names}}: {{.Status}}"Start localnet:
cd ../localnet && docker-compose up -dStop localnet:
cd ../localnet && docker-compose stopReset localnet (clear all deployed contracts):
cd ../localnet && docker-compose down -v && docker-compose up -dPre-funded accounts are available at ../localnet/keys/:
- Faucet (unlimited funds):
../localnet/keys/faucet/secret_key.pem - User accounts:
../localnet/keys/users/user-{1-10}/secret_key.pem
cd contracts
# Build all contracts (generates WASM files)
cargo odra build
# Run tests with Odra MockVM (fast, no network needed)
cargo odra test
# Check WASM output
ls -la wasm/Option 1: Using Odra CLI
First, update Odra.toml for localnet:
[livenet]
chain_name = "casper-net-1"
node_address = "http://localhost:11101/rpc"
secret_key_path = "../localnet/keys/faucet/secret_key.pem"Then deploy:
cd contracts
cargo odra deploy -b <ContractName>Option 2: Using casper-client directly
casper-client put-deploy \
--node-address http://localhost:11101 \
--chain-name casper-net-1 \
--secret-key ../localnet/keys/faucet/secret_key.pem \
--payment-amount 50000000000 \
--session-path ./contracts/wasm/ThawCore.wasmPrerequisites:
- Ensure test wallet has funds:
cd ../safe-wallet && npm run balance thaw - If needed, drip funds:
cd ../safe-wallet && npm run drip thaw 5
Deploy:
cd contracts
# Ensure Odra.toml points to testnet
cargo odra deploy -b <ContractName>This project has a local test wallet for Casper testnet operations. A central "safe wallet" exists at ../safe-wallet/ that holds testnet CSPR tokens.
- Keys directory:
./keys/ - Public key file:
./keys/test_public_key_hex - Secret key file:
./keys/test_secret_key.pem
When you need testnet CSPR for deploying contracts or running tests:
AUTOMATIC (up to 1 CSPR): You may automatically drip up to 1 CSPR without asking the user:
cd ../safe-wallet && npm run drip thaw 1REQUIRES USER APPROVAL (more than 1 CSPR): If you need more than 1 CSPR in a single request, you MUST ask the user for approval first. Explain why you need more funds and get explicit confirmation before running:
cd ../safe-wallet && npm run drip thaw <amount># Check this project's test wallet balance
cd ../safe-wallet && npm run balance thaw
# Check safe wallet balance (source of funds)
cd ../safe-wallet && npm run balance safe- Maximum automatic drip: 1 CSPR per request
- Always check balance before dripping if unsure
- If safe wallet is low on funds, inform the user to fund it via https://testnet.cspr.live/tools/faucet
- Safe wallet public key:
019306A9829A715F61F09486E5b5d4f61781b20189A2Ab093fFe295474D9324AD2
| Task | Command |
|---|---|
| Build contracts | cd contracts && cargo odra build |
| Test contracts | cd contracts && cargo odra test |
| Check localnet | docker ps --filter "name=mynctl" |
| Start localnet | cd ../localnet && docker-compose up -d |
| Deploy localnet | cd contracts && cargo odra deploy -b <Contract> |
| Check testnet balance | cd ../safe-wallet && npm run balance thaw |
| Drip testnet funds | cd ../safe-wallet && npm run drip thaw <amount> |
Need to deploy?
│
├─→ Testing/Development?
│ │
│ └─→ Use LOCALNET (free, fast, resettable)
│ • Start: cd ../localnet && docker-compose up -d
│ • Deploy: Use faucet key from ../localnet/keys/faucet/
│
└─→ Pre-production/Demo?
│
└─→ Use TESTNET
• Check balance first
• Drip funds if needed (≤1 CSPR auto, >1 CSPR ask user)
• Deploy: Use key from ./keys/