Getting Started
Getting Started with On-Chain Settlement
Step-by-step guide to enable on-chain settlement for your contracts. Takes ~15 minutes.
Prerequisites
Vercel project connected to FinalTX
Admin access to Vercel project settings
Solidity knowledge (for EVM) or Rust/Anchor knowledge (for Solana)
Testnet funds for deployment (or mainnet for production)
1
Generate Attestor Keypairs
Create keypairs for signing settlement verdicts. You'll need one for EVM and one for Solana.
// EVM - secp256k1
$ npm install ethers
$ node -e "const w = ethers.Wallet.createRandom(); console.log(w.privateKey, w.address)"
// Solana - Ed25519
$ solana-keygen new --outfile ~/finaltx-keypair.json
$ cat ~/finaltx-keypair.json | jq '.[0:4]'
Security: Store these keys securely. They sign all settlement verdicts. Rotate regularly in production.
2
Deploy Vault Smart Contracts
Deploy the vault contract to your target chains. Use the reference implementations provided.
EVM: Deploy SettlementVault.sol with your attestor address
Solana: Deploy finaltx_settlement program with attestor keypair
Start with testnet (Sepolia, Base testnet, Solana devnet) to verify before mainnet.
3
Set Environment Variables
Add your keys and vault addresses to Vercel project settings:
- 1. Go to Vercel project → Settings → Environment Variables
- 2. Add FINALTX_ATTESTOR_KEY_EVM and FINALTX_ATTESTOR_ADDRESS_EVM
- 3. Add FINALTX_ATTESTOR_KEY_SOLANA and FINALTX_ATTESTOR_ADDRESS_SOLANA
- 4. Add VAULT_ADDRESS_* for each chain you deployed to
- 5. Redeploy your Next.js application
Never commit private keys to git. Use .env.local locally, Vercel UI for production.
4
Create an On-Chain Contract
In your dashboard, select "On-Chain" as the payment method when creating a contract.
Chain: Base (or your choice)
Chain ID: 8453
Buyer Wallet: 0x...
Seller Wallet: 0x...
5
Verify & Submit Settlement
After verification passes, the On-Chain Settlement panel will show a signed verdict ready to submit.
1. Contract verifies as PASS
2. Click "Get Settlement Verdict"
3. FinalTX generates signed verdict (valid 7 days)
4. Submit to vault contract with your wallet
5. Gas paid by you; funds released to seller (minus 1% fee)