Skip to content

Commit 59e5371

Browse files
Jpatchingclaude
andcommitted
Add migrate command, live bridge detection, status monitor, dynamic discovery
The killer feature: `daybreak migrate` orchestrates end-to-end NTT migration from EVM token analysis to deployed Solana bridge in a single command. Also adds live WormholeScan API bridge detection (Portal vs NTT vs Native distinction), post-migration health monitoring via `daybreak status`, CoinGecko-powered token discovery, day-one liquidity planning in reports, and indicatif progress spinners. New commands: migrate, status New modules: discovery.rs Tests: 10 → 33 (bridge types, discovery, serialization, formatting) Version: 0.5.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b4fba9e commit 59e5371

16 files changed

Lines changed: 1640 additions & 364 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All notable changes to Daybreak will be documented in this file.
44

5+
## [0.5.0] - 2026-02-15
6+
7+
### Added
8+
- `migrate` command — end-to-end NTT orchestration: scan → deploy SPL → write deployment.json → shell out to NTT CLI → verify → print summary with explorer links
9+
- `status` command — post-migration bridge health monitor: queries Solana RPC for SPL token info and WormholeScan for recent bridge transfers
10+
- Live bridge detection — WormholeScan API integration replaces hardcoded bridge lookups; queries live Wormhole operations data
11+
- Bridge type distinction — Portal (wrapped) vs NTT (native via Sunrise) vs Native; the key Sunrise value prop
12+
- Dynamic token discovery — `--discover` flag on `list` command queries CoinGecko API for top ERC-20 tokens by market cap
13+
- Day-One Liquidity section in migration reports — Jupiter pool recommendations (DLMM vs CLMM), Sunrise liquidity checklist
14+
- `indicatif` progress spinners in `migrate` command for polished demo experience
15+
- `--skip-ntt` flag on `migrate` to deploy SPL token without requiring NTT CLI
16+
17+
### Changed
18+
- Bridge detection now queries WormholeScan API for real-time Wormhole attestation data, with expanded curated fallback (8 Portal + 2 Native + 1 NTT tokens)
19+
- `list` command refactored to use `TokenDiscovery` module — curated list as fallback, CoinGecko as dynamic source
20+
- Scan output "Next Steps" now leads with `daybreak migrate` as the primary action
21+
- `BridgeStatus` type extended with `bridge_type: Option<BridgeType>` field
22+
523
## [0.4.0] - 2026-02-15
624

725
### Added

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "daybreak"
3-
version = "0.1.0"
3+
version = "0.5.0"
44
edition = "2021"
55
description = "CLI tool for analyzing EVM tokens and generating Solana migration reports via Wormhole NTT"
66
authors = ["Jpatching"]
@@ -16,6 +16,7 @@ reqwest = { version = "0.12", features = ["json"] }
1616
serde = { version = "1", features = ["derive"] }
1717
serde_json = "1"
1818
colored = "2"
19+
indicatif = "0.17"
1920
anyhow = "1"
2021
solana-sdk = "~1.18"
2122
solana-client = "~1.18"

README.md

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Daybreak
22

3-
**Migration planning CLI for moving EVM tokens to Solana via [Sunrise](https://wormhole.com/products/ntt) (Wormhole NTT).**
3+
**End-to-end migration CLI for moving EVM tokens to Solana via [Sunrise](https://wormhole.com/products/ntt) (Wormhole NTT).**
44

55
[![CI](https://github.com/Jpatching/daybreak/actions/workflows/ci.yml/badge.svg)](https://github.com/Jpatching/daybreak/actions/workflows/ci.yml)
66
![Rust](https://img.shields.io/badge/Rust-000000?style=flat&logo=rust&logoColor=white)
77
![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)
88
![Solana](https://img.shields.io/badge/Solana-9945FF?style=flat&logo=solana&logoColor=white)
99

10+
<!-- Re-record demo with: daybreak migrate, status, list --discover -->
1011
![Daybreak Demo](demo.gif)
1112

12-
Daybreak analyzes any ERC-20 token on-chain — bytecode, capabilities, proxy patterns, bridge status — and tells you exactly how to migrate it to Solana using Native Token Transfers. It scores risk, recommends NTT modes, generates deployment configs, and deploys SPL tokens with metadata.
13+
Daybreak takes any ERC-20 token from analysis to deployed NTT bridge in a single command. It analyzes bytecode, capabilities, proxy patterns, and bridge status on-chain — then deploys the SPL token, writes the NTT config, and orchestrates the Wormhole CLI to complete the bridge. One command to migrate any EVM token to Solana via Sunrise.
1314

1415
## Why NTT?
1516

@@ -19,11 +20,13 @@ Daybreak analyzes any ERC-20 token on-chain — bytecode, capabilities, proxy pa
1920

2021
Moving an ERC-20 token to Solana means reading Wormhole docs, understanding NTT modes, checking decimal compatibility, analyzing bytecode for blockers, and manually writing deployment configs. **Daybreak does all of this in one command.**
2122

23+
- **One-command migration**`migrate` goes from EVM token to deployed NTT bridge end-to-end
24+
- **Live bridge detection** — Queries WormholeScan API to distinguish Portal (wrapped) vs NTT (native) vs Native tokens
2225
- **Instant analysis** — Risk score, compatibility verdict, and mode recommendation in seconds
2326
- **Zero guesswork** — Generates `deployment.json` and NTT CLI commands ready to run
24-
- **Discovery at scale**`list` finds 50+ migration candidates you didn't know about
27+
- **Dynamic discovery**`list --discover` finds migration candidates via CoinGecko API
28+
- **Post-migration monitoring**`status` tracks bridge health, supply, and transfer activity
2529
- **Real deployment**`deploy` creates SPL tokens on Solana with Metaplex metadata
26-
- **Readiness check**`check` verifies your tools, wallet, and config before you start
2730

2831
## Prerequisites
2932

@@ -37,46 +40,54 @@ Moving an ERC-20 token to Solana means reading Wormhole docs, understanding NTT
3740
```bash
3841
cargo install --path .
3942

40-
# Discover migration-ready tokens
41-
daybreak list --limit 10
43+
# One-command migration (the killer feature)
44+
daybreak migrate 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum --network devnet
45+
46+
# Or step by step:
47+
48+
# Discover migration-ready tokens (with live API discovery)
49+
daybreak list --limit 10 --discover
4250

4351
# Analyze ONDO (a strong migration candidate)
4452
daybreak scan 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum
4553

4654
# Generate migration report + deployment config
4755
daybreak report 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum -o ./output
4856

49-
# Compare migration paths (NTT vs Neon EVM vs native rewrite)
50-
daybreak compare 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum
51-
5257
# Deploy SPL token on Solana devnet (with Metaplex metadata)
5358
daybreak deploy 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum --network devnet
5459

55-
# Check migration readiness
56-
daybreak check 0xfAbA6f8e4a5E8Ab82F62fe7C39859FA577269BE3 --chain ethereum
60+
# Monitor bridge health after deployment
61+
daybreak status <SOLANA_MINT_ADDRESS> --network devnet
5762
```
5863

5964
## Full Migration Flow
6065

6166
```
6267
┌─────────────────────────────────────────────────────────────┐
63-
│ 1. DISCOVER daybreak list --limit 20 │
64-
│ Find tokens not yet on Solana │
68+
│ FAST PATH (one command) │
69+
│ daybreak migrate <ADDRESS> --chain ethereum --network devnet│
70+
│ Scan → Deploy SPL → Write config → NTT bridge → Done │
71+
├─────────────────────────────────────────────────────────────┤
72+
│ OR STEP BY STEP: │
73+
├─────────────────────────────────────────────────────────────┤
74+
│ 1. DISCOVER daybreak list --discover │
75+
│ Find tokens not yet on Solana (live API + curated) │
6576
├─────────────────────────────────────────────────────────────┤
6677
│ 2. ANALYZE daybreak scan <ADDRESS> │
67-
│ Risk score, NTT mode, compatibility verdict
78+
│ Risk score, NTT mode, bridge type (Portal vs NTT)
6879
├─────────────────────────────────────────────────────────────┤
6980
│ 3. PLAN daybreak report <ADDRESS> -o ./output │
70-
Migration report + deployment.json + NTT CLI commands
81+
Report + deployment.json + liquidity plan
7182
├─────────────────────────────────────────────────────────────┤
7283
│ 4. DEPLOY daybreak deploy <ADDRESS> --network devnet │
7384
│ SPL token on Solana with Metaplex metadata │
7485
├─────────────────────────────────────────────────────────────┤
75-
│ 5. CHECK daybreak check <ADDRESS> │
76-
│ Verify tools, wallet, and config │
77-
├─────────────────────────────────────────────────────────────┤
78-
│ 6. BRIDGE ntt init && ntt deploy │
86+
│ 5. BRIDGE ntt init && ntt deploy │
7987
│ Run generated NTT CLI commands to complete the bridge │
88+
├─────────────────────────────────────────────────────────────┤
89+
│ 6. MONITOR daybreak status <SOLANA_MINT> │
90+
│ Track bridge health, supply, and transfers │
8091
└─────────────────────────────────────────────────────────────┘
8192
```
8293

@@ -139,12 +150,14 @@ See [examples/](examples/) for sample migration reports:
139150

140151
| Command | Description | Key Flags |
141152
|---------|-------------|-----------|
142-
| `list` | Discover migration-ready ERC-20 tokens (50+ curated) | `--chain`, `--limit`, `--json` |
143-
| `scan` | Full token analysis with risk scoring | `--chain`, `--skip-holders`, `--json` |
144-
| `report` | Generate migration report + NTT deployment config | `--chain`, `-o/--output`, `--skip-holders` |
153+
| `migrate` | **End-to-end NTT migration** (scan → deploy → bridge) | `--chain`, `--network`, `--keypair`, `--skip-ntt` |
154+
| `list` | Discover migration-ready ERC-20 tokens | `--chain`, `--limit`, `--json`, `--discover` |
155+
| `scan` | Full token analysis with risk scoring + live bridge detection | `--chain`, `--skip-holders`, `--json` |
156+
| `report` | Generate migration report + deployment config + liquidity plan | `--chain`, `-o/--output`, `--skip-holders` |
145157
| `compare` | Compare migration paths (NTT / Neon EVM / native) | `--chain`, `--json` |
146158
| `deploy` | Deploy SPL token on Solana with Metaplex metadata | `--chain`, `--network`, `--keypair` |
147159
| `check` | Pre-migration readiness checker | `--chain`, `--network`, `--keypair` |
160+
| `status` | Post-migration bridge health monitor | `--network` |
148161

149162
**Global flags:** `--rpc-url` (custom RPC), `--etherscan-key` (holder data and volume-based rate limits)
150163

@@ -153,17 +166,20 @@ See [examples/](examples/) for sample migration reports:
153166
```
154167
src/
155168
├── main.rs # CLI entry point (clap)
156-
├── cli.rs # CLI argument definitions
169+
├── cli.rs # CLI argument definitions (8 commands)
157170
├── commands/
171+
│ ├── migrate.rs # End-to-end NTT orchestration (the killer feature)
158172
│ ├── scan.rs # Full analysis with progress output
159173
│ ├── report.rs # Markdown + deployment.json generation
160174
│ ├── compare.rs # Migration path comparison
161175
│ ├── deploy.rs # SPL token deployment + Metaplex metadata
162176
│ ├── check.rs # Pre-migration readiness checker
163-
│ └── list.rs # Token discovery (50+ curated tokens)
177+
│ ├── list.rs # Token discovery (dynamic + curated)
178+
│ └── status.rs # Post-migration bridge health monitor
164179
├── analyzers/
165180
│ ├── evm/ # Raw JSON-RPC calls, bytecode analysis
166-
│ ├── bridges.rs # Bridge detection (Jupiter, Wormhole)
181+
│ ├── bridges.rs # Live bridge detection (WormholeScan API + curated)
182+
│ ├── discovery.rs # Dynamic token discovery (CoinGecko API)
167183
│ ├── compatibility.rs # NTT compatibility + mode recommendation
168184
│ ├── holders.rs # Holder distribution via Etherscan
169185
│ └── volume.rs # Transfer volume + rate limit calculator
@@ -175,18 +191,20 @@ src/
175191
│ ├── ntt_config.rs # deployment.json + NTT CLI commands
176192
│ ├── migration_plan.rs # Step-by-step migration plan
177193
│ └── comparison.rs # Path comparison logic
178-
├── types/ # Shared types (Token, Analysis, Risk, etc.)
194+
├── types/ # Shared types (Token, Analysis, Risk, BridgeType, etc.)
179195
└── output/ # Terminal, Markdown, JSON formatters
180196
```
181197

182198
## How It Works
183199

184200
1. **EVM RPC** — Fetches token metadata, bytecode, and capabilities via raw JSON-RPC calls (no ethers-rs)
185201
2. **Bytecode analysis** — Detects proxy patterns, selfdestruct, fee-on-transfer, rebasing selectors
186-
3. **Bridge detection**Checks if the token already exists on Solana (Jupiter, native, Wormhole-wrapped)
202+
3. **Live bridge detection**Queries WormholeScan API + curated list; distinguishes Portal (wrapped) vs NTT (native) vs Native
187203
4. **Risk scoring** — Scores 0-100 across decimals, features, complexity, holders, and bridge status
188204
5. **NTT config** — Recommends locking/burning mode, generates `deployment.json` with rate limits and transceiver config
189205
6. **SPL deployment** — Creates the token on Solana with correct decimals and Metaplex metadata
206+
7. **NTT orchestration** — Shells out to the `ntt` CLI to add chains, deploy contracts, and push configuration
207+
8. **Post-migration** — Monitors bridge health via Solana RPC and WormholeScan API
190208

191209
## Supported Chains
192210

0 commit comments

Comments
 (0)