Skip to content

Commit aea43cc

Browse files
authored
Merge branch 'main' into feat/wave-229-238-189-115
2 parents c433a48 + 9009713 commit aea43cc

4,933 files changed

Lines changed: 327976 additions & 4804 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npx jest *)",
5+
"Bash(node node_modules/jest/bin/jest.js --no-coverage)",
6+
"Bash(node node_modules/typescript/bin/tsc --noEmit)"
7+
]
8+
}
9+
}

.github/dependabot.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
version: 2
2+
updates:
3+
# soroban-client (Next.js frontend)
4+
- package-ecosystem: "npm"
5+
directory: "/soroban-client"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
react:
10+
patterns: ["react", "react-dom", "@types/react*"]
11+
next:
12+
patterns: ["next", "@next/*"]
13+
stellar:
14+
patterns: ["@stellar/*", "stellar-sdk"]
15+
auto-merge:
16+
match:
17+
dependency-type: "all"
18+
update-type: "semver:patch"
19+
20+
# client (Vite/React frontend)
21+
- package-ecosystem: "npm"
22+
directory: "/client"
23+
schedule:
24+
interval: "weekly"
25+
groups:
26+
react:
27+
patterns: ["react", "react-dom", "@types/react*"]
28+
vite:
29+
patterns: ["vite", "@vitejs/*"]
30+
stellar:
31+
patterns: ["@stellar/*", "stellar-sdk"]
32+
auto-merge:
33+
match:
34+
dependency-type: "all"
35+
update-type: "semver:patch"
36+
37+
# tokenbound-client (Next.js)
38+
- package-ecosystem: "npm"
39+
directory: "/tokenbound-client"
40+
schedule:
41+
interval: "weekly"
42+
groups:
43+
next:
44+
patterns: ["next", "@next/*"]
45+
auto-merge:
46+
match:
47+
dependency-type: "all"
48+
update-type: "semver:patch"
49+
50+
# docs-site (Docusaurus)
51+
- package-ecosystem: "npm"
52+
directory: "/docs-site"
53+
schedule:
54+
interval: "weekly"
55+
groups:
56+
docusaurus:
57+
patterns: ["@docusaurus/*", "docusaurus"]
58+
auto-merge:
59+
match:
60+
dependency-type: "all"
61+
update-type: "semver:patch"
62+
63+
# soroban-contract (Cargo workspace)
64+
- package-ecosystem: "cargo"
65+
directory: "/soroban-contract"
66+
schedule:
67+
interval: "weekly"
68+
groups:
69+
soroban:
70+
patterns: ["soroban-*"]
71+
auto-merge:
72+
match:
73+
dependency-type: "all"
74+
update-type: "semver:patch"

.github/workflows/ci.yml

Lines changed: 70 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@ name: Soroban CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- develop
85
paths:
96
- "soroban-client/**"
107
- "soroban-contract/**"
118
- ".github/workflows/**"
129
pull_request:
13-
branches:
14-
- main
15-
- develop
1610
paths:
1711
- "soroban-client/**"
1812
- "soroban-contract/**"
13+
- ".github/workflows/**"
1914

2015
jobs:
2116
client:
@@ -66,10 +61,56 @@ jobs:
6661
# Add any required env vars for Next.js build
6762
# NEXT_PUBLIC_STELLAR_NETWORK: testnet
6863

69-
- name: Run tests
70-
run: npm test -- --passWithNoTests
64+
- name: Run tests with coverage
65+
run: npm run test:coverage -- --passWithNoTests
7166
if: hashFiles('soroban-client/package.json') != ''
7267

68+
- name: Upload frontend coverage to Codecov
69+
if: hashFiles('soroban-client/coverage/lcov.info') != ''
70+
uses: codecov/codecov-action@v5
71+
with:
72+
files: soroban-client/coverage/lcov.info
73+
flags: frontend
74+
name: frontend-coverage
75+
fail_ci_if_error: true
76+
77+
client-e2e:
78+
name: Client E2E Tests
79+
runs-on: ubuntu-latest
80+
needs: [client]
81+
82+
defaults:
83+
run:
84+
working-directory: client
85+
86+
steps:
87+
- name: Checkout repo
88+
uses: actions/checkout@v4
89+
90+
- name: Setup Node.js
91+
uses: actions/setup-node@v4
92+
with:
93+
node-version: "20"
94+
95+
- name: Cache node modules
96+
uses: actions/cache@v4
97+
with:
98+
path: client/node_modules
99+
key: ${{ runner.os }}-node-client-${{ hashFiles('client/package-lock.json') }}
100+
restore-keys: |
101+
${{ runner.os }}-node-client-
102+
103+
- name: Install dependencies
104+
run: npm ci
105+
106+
- name: Install Playwright browsers
107+
run: npx playwright install --with-deps
108+
109+
- name: Run E2E tests
110+
run: npm run test:e2e
111+
env:
112+
CI: true
113+
73114
soroban:
74115
name: Soroban Contracts CI
75116
runs-on: ubuntu-latest
@@ -106,6 +147,10 @@ jobs:
106147
uses: dtolnay/rust-toolchain@stable
107148
with:
108149
targets: wasm32-unknown-unknown
150+
components: llvm-tools-preview
151+
152+
- name: Install cargo-llvm-cov
153+
uses: taiki-e/install-action@cargo-llvm-cov
109154

110155
- name: Install system dependencies
111156
run: |
@@ -120,28 +165,38 @@ jobs:
120165
- name: Check contract formatting
121166
working-directory: soroban-contract
122167
run: cargo fmt --all -- --check
123-
continue-on-error: true
124168

125169
- name: Build contracts
126170
working-directory: soroban-contract
127171
run: |
128172
cargo build --release --target wasm32-unknown-unknown -p ticket_nft
129173
cargo build --release --target wasm32-unknown-unknown -p tba_account
130-
soroban contract build
174+
cargo build --release --target wasm32-unknown-unknown
175+
176+
- name: Run contract tests
177+
working-directory: soroban-contract
178+
run: cargo test --workspace --all-targets
131179

132180
- name: Optimize contracts
133181
working-directory: soroban-contract
134182
run: soroban contract optimize --wasm target/wasm32-unknown-unknown/release/*.wasm
135-
continue-on-error: true
136183

137184
- name: Run clippy
138185
working-directory: soroban-contract
139186
run: cargo clippy --all-targets -- -D warnings
140-
continue-on-error: true
141187

142-
- name: Run contract tests
188+
- name: Run contract tests with coverage
143189
working-directory: soroban-contract
144-
run: cargo test --workspace
190+
run: cargo llvm-cov --workspace --lcov --output-path coverage/lcov.info --fail-under-lines 70
191+
192+
- name: Upload Rust coverage to Codecov
193+
if: hashFiles('soroban-contract/coverage/lcov.info') != ''
194+
uses: codecov/codecov-action@v5
195+
with:
196+
files: soroban-contract/coverage/lcov.info
197+
flags: rust
198+
name: rust-coverage
199+
fail_ci_if_error: true
145200

146201
integration:
147202
name: Integration Tests
@@ -177,7 +232,7 @@ jobs:
177232

178233
- name: Build contracts
179234
working-directory: soroban-contract
180-
run: soroban contract build
235+
run: cargo build --release --target wasm32-unknown-unknown
181236

182237
- name: Run integration tests
183238
working-directory: soroban-client

.github/workflows/publish-wasm.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Publish WASM Artifacts
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Rust
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: stable
22+
target: wasm32v1-none
23+
override: true
24+
25+
- name: Build all contracts
26+
run: |
27+
cd soroban-contract
28+
29+
# Build only the contract packages (exclude integration tests)
30+
cargo build --target wasm32v1-none --release \
31+
-p tba_account \
32+
-p tba_registry \
33+
-p ticket_nft \
34+
-p ticket_factory \
35+
-p event_manager \
36+
-p marketplace
37+
38+
echo "=== WASM files in release directory ==="
39+
ls -la target/wasm32v1-none/release/*.wasm 2>/dev/null || echo "No WASM files found"
40+
41+
- name: Generate checksums
42+
run: |
43+
cd soroban-contract/target/wasm32v1-none/release/
44+
45+
# Check if any WASM files exist
46+
if [ -z "$(ls *.wasm 2>/dev/null)" ]; then
47+
echo "Error: No WASM files found!"
48+
exit 1
49+
fi
50+
51+
sha256sum *.wasm > checksums.txt
52+
echo "Checksums generated:"
53+
cat checksums.txt
54+
55+
- name: Generate changelog
56+
run: |
57+
VERSION=${GITHUB_REF_NAME#v}
58+
echo "# Release $VERSION" > CHANGELOG.md
59+
echo "" >> CHANGELOG.md
60+
echo "## Contracts" >> CHANGELOG.md
61+
echo "" >> CHANGELOG.md
62+
63+
cd soroban-contract/target/wasm32v1-none/release/
64+
echo "| Contract | Size (bytes) | SHA256 |" >> ../../../CHANGELOG.md
65+
echo "|----------|--------------|--------|" >> ../../../CHANGELOG.md
66+
67+
for wasm in *.wasm; do
68+
size=$(stat -c%s "$wasm")
69+
hash=$(sha256sum "$wasm" | cut -d' ' -f1)
70+
echo "| $wasm | $size | $hash |" >> ../../../CHANGELOG.md
71+
done
72+
73+
cd ../../..
74+
echo "" >> CHANGELOG.md
75+
echo "## Changes" >> CHANGELOG.md
76+
git log $(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "HEAD")..HEAD --pretty=format:"- %s" >> CHANGELOG.md
77+
78+
- name: Create Release
79+
uses: softprops/action-gh-release@v1
80+
with:
81+
tag_name: ${{ github.ref_name }}
82+
name: Release ${{ github.ref_name }}
83+
body_path: CHANGELOG.md
84+
files: |
85+
soroban-contract/target/wasm32v1-none/release/*.wasm
86+
soroban-contract/target/wasm32v1-none/release/checksums.txt
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
run: npm ci
2525
- name: Run Tests
2626
working-directory: ./soroban-client
27-
run: npm test
27+
run: npm run test:coverage -- --passWithNoTests

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
soroban.tar.gz
2+
node_modules/
3+
.husky/_/
4+
5+
# Environment variable files
6+
.env
7+
.env.local
8+
.env.*.local
9+
10+
# Rust build artifacts
11+
soroban-contract/target/
12+
soroban-contract/targets/

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
npm run precommit

.husky/pre-push

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
4+
# Keep the pre-push hook developer-friendly on machines without Rust installed.
5+
npm run test --prefix soroban-client
6+
7+
if command -v cargo >/dev/null 2>&1; then
8+
cargo test --manifest-path soroban-contract/Cargo.toml --all-targets --all-features
9+
else
10+
echo "[pre-push] cargo not found; skipping Rust tests"
11+
fi

.prettierignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**/node_modules
2+
**/.next
3+
**/out
4+
**/build
5+
**/dist
6+
**/coverage
7+
**/.turbo
8+
**/.docusaurus
9+
**/.parcel-cache
10+
**/test_snapshots
11+
*.png
12+
*.jpg
13+
*.jpeg
14+
*.gif
15+
*.ico
16+
*.svg
17+
*.webp
18+
*.avif
19+
*.pdf

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

0 commit comments

Comments
 (0)