|
| 1 | + --- |
| 2 | +title: 'Self‑Hosted Deployment' |
| 3 | +sidebarTitle: 'Self‑Hosted Deployment' |
| 4 | +description: 'Deploy the Wraith protocol on your own Stellar network (Futurenet)' |
| 5 | +--- |
| 6 | + |
| 7 | +This guide walks you through a full self‑hosted deployment of the Wraith |
| 8 | +protocol on Futurenet. By the end, you’ll have all four core contracts |
| 9 | +deployed, wired, and verified — ready for your own applications. |
| 10 | + |
| 11 | +## Prerequisites |
| 12 | + |
| 13 | +Tool Version Check |
| 14 | +Rust ≥ 1.78 rustc --version |
| 15 | +wasm32 target any `rustup target list --installed` |
| 16 | +stellar‑cli ≥ 22.0.1 stellar --version |
| 17 | +Funded Stellar keypair – stellar account show <address> --network futurenet |
| 18 | + |
| 19 | +Install the wasm target if missing: |
| 20 | + |
| 21 | +```bash |
| 22 | +rustup target add wasm32-unknown-unknown |
| 23 | + |
| 24 | +## 1. Set Up a Futurenet Identity |
| 25 | +Generate a new keypair and fund it via friendbot: |
| 26 | +stellar keys generate wraith-deployer --network futurenet |
| 27 | + |
| 28 | +curl "[https://friendbot-futurenet.stellar.org/?addr=$(stellar](https://friendbot-futurenet.stellar.org/?addr=$(stellar) keys address wraith-deployer)" |
| 29 | +
|
| 30 | +Verify the balance: |
| 31 | +stellar account show $(stellar keys address wraith-deployer) --network futurenet |
| 32 | +
|
| 33 | +You should see at least 10 XLM to cover deployment costs. |
| 34 | +## 2. Dry‑Run Walkthrough |
| 35 | +A dry‑run prints every command that would be executed without spending funds. |
| 36 | +Use it to audit the sequence. |
| 37 | +Clone the contracts repo and enter the Stellar directory: |
| 38 | +git clone [https://github.com/wraith-protocol/contracts.git](https://github.com/wraith-protocol/contracts.git) |
| 39 | +cd contracts/stellar |
| 40 | +
|
| 41 | +Run the dry‑run: |
| 42 | +./deploy.sh futurenet wraith-deployer --dry-run |
| 43 | +
|
| 44 | +Expected output: |
| 45 | +🚀 Deploying Wraith Protocol to futurenet using wraith-deployer... |
| 46 | +[DRY-RUN] Will execute: cargo build --target wasm32-unknown-unknown --release |
| 47 | +[DRY-RUN] Will execute: stellar contract optimize on all contracts |
| 48 | +[DRY-RUN] Will deploy: stealth-announcer |
| 49 | +[DRY-RUN] Will deploy: stealth-registry |
| 50 | +[DRY-RUN] Will deploy: stealth-sender |
| 51 | +[DRY-RUN] Will invoke: stealth-sender init |
| 52 | +[DRY-RUN] Will deploy: wraith-names |
| 53 | +[DRY-RUN] Will write manifest to deployments/futurenet.json |
| 54 | +
|
| 55 | +If this exits cleanly, the deployment plan is valid. |
| 56 | +## 3. Full Futurenet Deployment |
| 57 | +From the contracts/stellar directory, run the same command without --dry-run: |
| 58 | +./deploy.sh futurenet wraith-deployer |
| 59 | +
|
| 60 | +The script will: |
| 61 | +· Build all contracts (cargo build --target wasm32-unknown-unknown --release) |
| 62 | +· Optimize WASM files with stellar contract optimize |
| 63 | +· Deploy each contract in dependency order |
| 64 | +· Wire contracts by calling init on stealth-sender with the announcer ID |
| 65 | +· Write a deployment manifest to stellar/deployments/futurenet.json |
| 66 | +· Verify each deployed contract responds to a read call |
| 67 | +You’ll see output ending with: |
| 68 | +🎉 Deployment Complete! |
| 69 | +-------------------------------------- |
| 70 | +Announcer: CAAA... |
| 71 | +Registry: CBBB... |
| 72 | +Sender: CCCC... |
| 73 | +Names: CDDD... |
| 74 | +-------------------------------------- |
| 75 | +
|
| 76 | +## 4. Wiring Contracts (Already Done) |
| 77 | +The deploy script automatically wires the contracts. Specifically, it calls: |
| 78 | +soroban contract invoke \ |
| 79 | + --id <SENDER_ID> \ |
| 80 | + --source wraith-deployer \ |
| 81 | + --network futurenet \ |
| 82 | + -- init --admin <DEPLOYER_ADDRESS> --announcer <ANNOUNCER_ID> |
| 83 | +
|
| 84 | +No additional wiring steps are required for a self‑hosted instance. |
| 85 | +## 5. Publishing Contract IDs |
| 86 | +The deployment manifest at stellar/deployments/futurenet.json contains all |
| 87 | +contract IDs and is the canonical record of your deployment. |
| 88 | +Share this file with any consumer application. Its structure: |
| 89 | +{ |
| 90 | + "network": "futurenet", |
| 91 | + "contracts": { |
| 92 | + "stealthAnnouncer": "CAAA...", |
| 93 | + "stealthRegistry": "CBBB...", |
| 94 | + "stealthSender": "CCCC...", |
| 95 | + "wraithNames": "CDDD..." |
| 96 | + } |
| 97 | +} |
| 98 | +
|
| 99 | +## Verification |
| 100 | +Open each contract on Stellar Expert: |
| 101 | +[https://futurenet.stellar.expert/explorer/futurenet/contract/](https://futurenet.stellar.expert/explorer/futurenet/contract/)<CONTRACT_ID> |
| 102 | +
|
| 103 | +You should see ledger entries confirming the deployment. |
| 104 | +Your self‑hosted Wraith instance is now live. You can register names, |
| 105 | +announce stealth meta‑addresses, and send private payments against these contracts. |
| 106 | +
|
0 commit comments