Skip to content

Commit ea206d7

Browse files
committed
chore: initial setup
0 parents  commit ea206d7

15 files changed

Lines changed: 620 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1.
16+
2.
17+
3.
18+
19+
## Expected Behavior
20+
21+
What you expected to happen.
22+
23+
## Actual Behavior
24+
25+
What actually happened.
26+
27+
## Environment
28+
29+
- Rust version:
30+
- Cargo version:
31+
- OS:
32+
- Soroban SDK version:
33+
34+
## Additional Context
35+
36+
Add any other context about the problem here.
37+
38+
## Possible Solution
39+
40+
If you have ideas on how to fix this, please describe them here.
41+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of the feature you'd like to see.
12+
13+
## Motivation
14+
15+
Why is this feature needed? What problem does it solve?
16+
17+
## Proposed Solution
18+
19+
Describe how you envision this feature working.
20+
21+
## Alternatives Considered
22+
23+
Describe any alternative solutions or features you've considered.
24+
25+
## Additional Context
26+
27+
Add any other context, mockups, or examples about the feature request here.
28+
29+
## Implementation Notes
30+
31+
If you have ideas on how to implement this, please share them here.
32+

‎.github/pull_request_template.md‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Description
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## Type of Change
6+
7+
<!-- Mark the relevant option with an 'x' -->
8+
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Code refactoring
14+
- [ ] Test improvements
15+
- [ ] Other (please describe):
16+
17+
## Related Issues
18+
19+
<!-- Link to related issues using #issue_number -->
20+
21+
Fixes #
22+
23+
24+
## Changes Made
25+
26+
<!-- Provide a detailed list of changes -->
27+
28+
-
29+
-
30+
-
31+
32+
## Testing
33+
34+
<!-- Describe the tests you ran and how to reproduce them -->
35+
36+
- [ ] I have added tests that prove my fix is effective or that my feature works
37+
- [ ] All existing tests pass locally
38+
- [ ] I have tested this manually
39+
40+
41+
## Checklist
42+
43+
<!-- Mark completed items with an 'x' -->
44+
45+
- [ ] My code follows the project's style guidelines
46+
- [ ] I have performed a self-review of my own code
47+
- [ ] I have commented my code, particularly in hard-to-understand areas
48+
- [ ] I have made corresponding changes to the documentation
49+
- [ ] My changes generate no new warnings
50+
- [ ] I have added tests that prove my fix is effective or that my feature works
51+
- [ ] New and existing unit tests pass locally with my changes
52+
- [ ] Any dependent changes have been merged and published
53+
54+
## Screenshots (if applicable)
55+
56+
<!-- Add screenshots to help explain your changes -->
57+
58+
## Additional Notes
59+
60+
<!-- Add any other context about the pull request here -->
61+

‎.github/workflows/ci.yml‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
test:
15+
name: Test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install Rust
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: rustfmt, clippy
24+
25+
- name: Cache cargo registry
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.cargo/bin/
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
target/
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-cargo-
37+
38+
- name: Run tests
39+
run: cargo test --workspace --all-features
40+
41+
- name: Check formatting
42+
run: cargo fmt --all -- --check
43+
44+
- name: Run clippy
45+
run: cargo clippy --workspace --all-features -- -D warnings
46+
47+
build:
48+
name: Build
49+
runs-on: ubuntu-latest
50+
needs: test
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Install Rust
55+
uses: dtolnay/rust-toolchain@stable
56+
57+
- name: Cache cargo registry
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
~/.cargo/bin/
62+
~/.cargo/registry/index/
63+
~/.cargo/registry/cache/
64+
~/.cargo/git/db/
65+
target/
66+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
67+
restore-keys: |
68+
${{ runner.os }}-cargo-
69+
70+
- name: Build contracts
71+
run: cargo build --workspace --release
72+
73+
- name: Check contract builds
74+
run: |
75+
for contract in contracts/*/; do
76+
if [ -f "$contract/Cargo.toml" ]; then
77+
echo "Building contract: $contract"
78+
cargo build --manifest-path "$contract/Cargo.toml" --release
79+
fi
80+
done
81+

‎.github/workflows/pre-commit.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pre-commit Checks
2+
3+
on:
4+
pull_request:
5+
branches: [ main, develop ]
6+
push:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
pre-commit:
11+
name: Pre-commit Hooks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install pre-commit
22+
run: pip install pre-commit
23+
24+
- name: Run pre-commit
25+
run: pre-commit run --all-files
26+

‎.gitignore‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Rust
2+
target/
3+
**/*.rs.bk
4+
*.pdb
5+
Cargo.lock
6+
7+
# IDE
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
*~
13+
14+
# OS
15+
.DS_Store
16+
Thumbs.db
17+
18+
# Pre-commit
19+
.pre-commit-config.yaml.bak
20+
21+
# Build artifacts
22+
*.wasm
23+
*.wasm.d
24+
25+
# Test artifacts
26+
*.test.wasm
27+

‎.pre-commit-config.yaml‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Pre-commit hooks configuration
2+
# Install with: pip install pre-commit && pre-commit install
3+
# Run manually with: pre-commit run --all-files
4+
5+
repos:
6+
# General file checks
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v4.5.0
9+
hooks:
10+
- id: trailing-whitespace
11+
- id: end-of-file-fixer
12+
- id: check-yaml
13+
- id: check-added-large-files
14+
args: ['--maxkb=1000']
15+
- id: check-merge-conflict
16+
- id: check-case-conflict
17+
- id: mixed-line-ending
18+
args: ['--fix=lf']
19+
- id: detect-private-key
20+
21+
# Rust formatting and linting
22+
- repo: https://github.com/doublify/pre-commit-rust
23+
rev: v1.0
24+
hooks:
25+
- id: fmt
26+
args: [--all, --]
27+
- id: clippy
28+
args: [--all-features, --, -D, warnings]
29+
- id: cargo-check
30+
args: [--all-features]
31+
32+
# Cargo.toml formatting
33+
- repo: https://github.com/pre-commit/mirrors-prettier
34+
rev: v4.0.0-alpha.8
35+
hooks:
36+
- id: prettier
37+
types: [toml]
38+
exclude: ^Cargo.lock
39+

0 commit comments

Comments
 (0)