Skip to content

Commit 2fc00a8

Browse files
0xdevcollinsclaude
andauthored
docs: rewrite README with deployed addresses and versions (#59)
* docs: rewrite README with deployed addresses and versions Replace the stale README with one that matches the shipped contracts: - Deployments table: mainnet events/profile at 1.1.0, testnet events/profile at 1.0.0 (addresses + live version() reads) - Contract descriptions cover all four pillars and the current profile surface (reputation + earnings, lazy bootstrap) - Repo layout matches the tree (bootstrap.rs, crowdfunding.rs, profile_client.rs, scripts/admin + scripts/deploy) - Deploy sequence reflects the current constructors; upgrade section documents the timelocked propose/apply/migrate flow - Drop external spec references and stale audit/deployment notes Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: remove obsolete contract-deploy workflow file * chore: add testnet branch to rustfmt and verify-build CI triggers * ci: remove dangling references to deleted contract-deploy workflow rustfmt.yml: drop the workflow_call trigger, deploy job, and secret declarations that existed only to chain into contract-deploy.yml. verify-build.yml: drop the chained rustfmt job that called rustfmt.yml as a reusable workflow (no longer reusable) with secrets it no longer declares; the standalone rustfmt workflow covers the same push branches. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 1eceea0 commit 2fc00a8

4 files changed

Lines changed: 36 additions & 193 deletions

File tree

.github/workflows/contract-deploy.yml

Lines changed: 0 additions & 135 deletions
This file was deleted.

.github/workflows/rustfmt.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,12 @@ on:
55
branches:
66
- main
77
- develop
8+
- testnet
89
pull_request:
910
branches:
1011
- main
1112
- develop
1213
- testnet
13-
workflow_call:
14-
secrets:
15-
STELLAR_SECRET_KEY:
16-
required: true
17-
SOROBAN_SECRET_KEY:
18-
required: true
19-
CONTRACT_ID:
20-
required: false
2114

2215
permissions:
2316
contents: read
@@ -41,14 +34,3 @@ jobs:
4134

4235
- name: Run rustfmt
4336
run: cargo fmt -- --check
44-
45-
deploy:
46-
needs: rustfmt
47-
# Never deploy from a PR run. Deploy only on direct pushes (the workflow
48-
# is chained here for the push-to-branch CD path, not for PR checks).
49-
if: github.event_name == 'push'
50-
uses: ./.github/workflows/contract-deploy.yml
51-
secrets:
52-
STELLAR_SECRET_KEY: ${{ secrets.STELLAR_SECRET_KEY }}
53-
SOROBAN_SECRET_KEY: ${{ secrets.SOROBAN_SECRET_KEY }}
54-
CONTRACT_ID: ${{ secrets.CONTRACT_ID }}

.github/workflows/verify-build.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- main
66
- develop
7+
- testnet
78
paths:
89
- 'contracts/**'
910
- '.github/workflows/verify-build.yml'
@@ -57,14 +58,3 @@ jobs:
5758
5859
- name: Run tests
5960
run: cargo test --release
60-
61-
rustfmt:
62-
needs: build
63-
# On PRs the standalone rustfmt workflow posts the `rustfmt` check; this
64-
# chained call (which fans out to deploy) runs only on push, never on a PR.
65-
if: success() && github.event_name == 'push'
66-
uses: ./.github/workflows/rustfmt.yml
67-
secrets:
68-
STELLAR_SECRET_KEY: ${{ secrets.STELLAR_SECRET_KEY }}
69-
SOROBAN_SECRET_KEY: ${{ secrets.SOROBAN_SECRET_KEY }}
70-
CONTRACT_ID: ${{ secrets.CONTRACT_ID }}

README.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,28 @@ Two contracts in one workspace.
88

99
| Contract | Path | Purpose |
1010
|----------|------|---------|
11-
| `boundless-events` | `contracts/events` | Event records (hackathon, bounty, grant) and inlined escrow. Multi-token whitelist. Idempotency. Per-pillar dispatch on a single canonical `create_event`. |
12-
| `boundless-profile` | `contracts/profile` | Per-user credits and reputation. Lazy bootstrap. Per-token earnings tracking. Mutated almost exclusively by the events contract. |
11+
| `boundless-events` | `contracts/events` | Event records for the four pillars (hackathon, bounty, grant, crowdfunding) with inlined escrow. Multi-token whitelist. Idempotent operations. Per-pillar dispatch on a single canonical `create_event`. Paged cancellation and timelocked upgrades. |
12+
| `boundless-profile` | `contracts/profile` | Per-user reputation and per-token earnings. Lazy profile bootstrap. Mutated almost exclusively by the events contract. |
1313

14-
Specs live in the platform PRD set under the parent `boundless-repos/` directory:
14+
## Deployments
1515

16-
- `boundless-platform-contract-prd.md` (events contract)
17-
- `boundless-credits-reputation-prd.md` (profile contract)
18-
- `boundless-chain-abstraction-adr.md` (off-chain readiness for a future second chain)
19-
- `boundless-organizer-end-to-end-prd.md` (umbrella; everything organizer-side)
16+
| Network | Contract | Address | Version |
17+
|---------|----------|---------|---------|
18+
| Mainnet | `boundless-events` | `CCFVEGOQJEM47LRAJU2LHEK4KTL5VYN7AOGZ2HH2GNHAMXTILNMMJGQZ` | `1.1.0` |
19+
| Mainnet | `boundless-profile` | `CD3KH4OE7HDHHHUYFX3U4L7NLIILMXAY6HM5FEH2UH6UBOKX4HDNE3PC` | `1.1.0` |
20+
| Testnet | `boundless-events` | `CBEODVJGUYCIYTVXD7KI5UG3BJ2UE4T7AGI2TGY3T4Q5GQRFGTRYVTZP` | `1.0.0` |
21+
| Testnet | `boundless-profile` | `CCA3OAIBOZBUPHPRI5GI6N5PDTE7RTNLKAEID4JTC2YZIHIZNDX5Q6T3` | `1.0.0` |
22+
23+
Both contracts expose an on-chain `version()` view; the versions above are live reads.
2024

2125
## Architecture in one paragraph
2226

23-
The events contract is the on-chain anchor of event existence, key terms, escrow custody, submission anchors, and winner records. The profile contract is the on-chain anchor of credit balances and reputation scores. The events contract calls into the profile contract for credit charging on apply, credit earning on accept, and reputation bumping on win. The off-chain orchestrator (`boundless-nestjs`) handles everything else: drafts, rich content via `content_uri`, KYC, role policies, AI features, moderation. The contracts hold the things the platform cannot afford to be trusted on; nestjs holds the things that benefit from iteration speed.
27+
The events contract is the on-chain anchor of event existence, key terms, escrow custody, submission anchors, and winner records. Funds enter escrow at creation (or through top-ups), fees are taken at deposit, and payouts release through `select_winners` or per-milestone claims. The profile contract is the on-chain anchor of reputation scores and per-token earnings. The events contract calls into the profile contract to bootstrap profiles on first touch, bump reputation on wins and milestones, and register earnings on payout. Every state-mutating operation carries an idempotency key, admin surfaces are pausable, and upgrades are timelocked.
2428

2529
## Prerequisites
2630

2731
- Rust 1.90.0 (`rust-toolchain.toml` pins this).
28-
- Soroban SDK 23.5.2.
32+
- Soroban SDK 23.5.x (workspace-pinned in `Cargo.toml`).
2933
- `stellar` CLI for building WASM (`brew install stellar/tap/stellar-cli`).
3034
- `wasm32v1-none` target: `rustup target add wasm32v1-none`.
3135

@@ -44,14 +48,17 @@ cd contracts/events && make size && cd ../..
4448
cd contracts/profile && make size && cd ../..
4549
```
4650

51+
Test snapshots under `contracts/*/test_snapshots/` are the audit trail. When fixtures change shape, regenerate snapshots intentionally and commit them in the same PR.
52+
4753
## Repo layout
4854

4955
```
5056
boundless-contract/
5157
├── Cargo.toml # workspace
5258
├── rust-toolchain.toml
53-
├── .cargo/
54-
├── .github/workflows/ # verify, deploy, rustfmt
59+
├── deploy_and_upgrade.sh # testnet deploy / upgrade helper
60+
├── deploy_mainnet.sh # mainnet cold deploy
61+
├── .github/workflows/ # verify-build, rustfmt, deploy
5562
├── contracts/
5663
│ ├── events/
5764
│ │ ├── Cargo.toml
@@ -62,48 +69,47 @@ boundless-contract/
6269
│ │ ├── errors.rs # error code enum
6370
│ │ ├── events.rs # contract event emissions
6471
│ │ ├── storage.rs # persistent / temporary key helpers
65-
│ │ ├── admin.rs # init, rotation, pause, upgrade
72+
│ │ ├── admin.rs # init, rotation, pause, timelocked upgrade
6673
│ │ ├── token_whitelist.rs # admin-managed supported-tokens set
6774
│ │ ├── escrow.rs # fee math, token transfer helpers
6875
│ │ ├── event_ops.rs # canonical create / submit / select_winners
6976
│ │ ├── hackathon.rs # pillar-specific validation
7077
│ │ ├── bounty.rs # pillar-specific validation + apply / withdraw
7178
│ │ ├── grant.rs # pillar-specific validation + claim_milestone
79+
│ │ ├── crowdfunding.rs # pillar-specific validation
80+
│ │ ├── profile_client.rs # cross-contract interface to boundless-profile
7281
│ │ ├── idempotency.rs # OpSeen helpers + deployment-epoch ID base
7382
│ │ └── tests/ # per-area integration tests
7483
│ └── profile/
7584
│ ├── Cargo.toml
7685
│ ├── Makefile
7786
│ └── src/
7887
│ ├── lib.rs # contract entry, public surface
79-
│ ├── types.rs # Profile, PendingAdmin
88+
│ ├── types.rs # Profile, PendingAdmin, PendingUpgrade
8089
│ ├── errors.rs
8190
│ ├── events.rs
8291
│ ├── storage.rs
83-
│ ├── admin.rs # init, two-step rotations, pause, upgrade
84-
│ ├── credits.rs # bootstrap, spend, earn, refund, admin_grant
92+
│ ├── admin.rs # init, two-step rotations, pause, timelocked upgrade
93+
│ ├── bootstrap.rs # lazy profile creation (bootstrap / bootstrap_self)
8594
│ ├── reputation.rs # bump, slash, admin_slash
8695
│ ├── earnings.rs # per-token earnings registration
8796
│ ├── idempotency.rs # OpSeen helpers
8897
│ └── tests/
89-
└── docs/
90-
└── ARCHITECTURE.md # the why
98+
└── scripts/
99+
├── admin/ # verify-multisig.sh
100+
└── deploy/ # deploy.sh, register_token.sh
91101
```
92102

93-
## Deployment
94-
95-
Two-step sequence (see `boundless-credits-reputation-prd.md` Section 13.1):
96-
97-
1. Deploy `boundless-profile` with `default_bootstrap_credits = 10`.
98-
2. Deploy `boundless-events` with the profile contract's address + admin + fee_account + fee_bps.
99-
3. Call `profile.set_events_contract(events_addr)`, then `accept_events_contract` as the events contract address.
100-
4. Register supported tokens on `boundless-events` (USDC at launch).
103+
## Deployment and upgrades
101104

102-
Deployment scripts live in `scripts/`. Mainnet deploys are multisig-gated and only after external audit clears.
105+
Fresh deploy sequence for a new network:
103106

104-
## Audit
107+
1. Deploy `boundless-profile` with the admin address.
108+
2. Deploy `boundless-events` with the profile contract's address, admin, fee account, and fee bps.
109+
3. Call `profile.set_events_contract(events_addr)` (first-set-only; later rotation is a timelocked two-step).
110+
4. Register supported tokens on `boundless-events`.
105111

106-
External audit is the hard gate before mainnet. Audit checklist is in the platform contract PRD Section 15.3.
112+
Upgrades are timelocked three-step operations: `propose_upgrade(wasm_hash, version)`, wait the timelock (~1 day on mainnet), `apply_upgrade()`, then `migrate()` to stamp the migration marker. A pending proposal can be inspected with `get_pending_upgrade()` and withdrawn with `cancel_pending_upgrade()`.
107113

108114
## Contributing
109115

0 commit comments

Comments
 (0)