Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase, and comments #4

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: scarb fmt --check
- run: scarb build
- run: scarb build --all-features
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
- run: snforge test
- run: scarb test --all-features
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scarb 2.8.0
scarb 2.8.4
starknet-foundry 0.27.0
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,25 @@ To build/update the bindings, first build the contract with `scarb`.

Then, within the Rust project `bindings/` run:

````bash
cargo build
````
```bash
cargo build --bin generator
```

This will generate the bindings into `src/lib.rs`, which can be imported in other Rust project.
Currently some warnings are displayed, will be fixed in a future version of `cainome`.

## Test

To test the project, run:

```bash
snforge test
scarb test --all-features
```

Or using the script (where further tests may be added in the future):

```bash
bash scripts/test_all_features.sh
```

## Code style (cairo)
Expand All @@ -68,3 +77,9 @@ let addr = contract_address_const::<0>();
```

- Document functions inside the trait, and add details if needed in the implementation.

To enforce the cairo linter, please use:

```bash
bash scripts/cairo_fmt.sh --fix
```
4 changes: 3 additions & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2023_10"

[dependencies]
starknet = "2.8.0"
starknet = "2.8.4"
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.16.0" }

[dev-dependencies]
Expand All @@ -25,3 +25,5 @@ sierra = true
[tool.fmt]
sort-module-level-items = true

[features]
messaging_test = []
Loading