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

Upgrade starknet 2.6.0, Snfoundry 0.26.0 #115

Merged
merged 9 commits into from
Jul 22, 2024
Merged
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 @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.5.4"
scarb-version: "2.6.0"
- name: Cairo lint
run: scarb fmt --check
- name: Cairo build
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Run Tests
on:
pull_request:
types:
- closed
branches:
- main
push:
branches:
- main

jobs:
check:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'

steps:
- name: Checkout repository
Expand All @@ -16,12 +18,12 @@ jobs:
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.5.4"
scarb-version: "2.6.0"

- name: Setup snfoundry
uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: "0.18.0"
starknet-foundry-version: "0.26.0"

- name: Run Cairo tests
id: cairo_tests
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ node.json
artifacts
target
Scarb.lock
.tool-versions

# nile
127.0.0.1.*
Expand Down
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
starknet-foundry 0.26.0
scarb 2.6.0
8 changes: 4 additions & 4 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ If you have an idea for a new feature, please submit a feature request using the

#### Requirements

- [Scarb](https://docs.swmansion.com/scarb/): *v2.5.4*
- [Starknet Foundry](https://foundry-rs.github.io/starknet-foundry/index.html) *v0.18.0*
- [Scarb](https://docs.swmansion.com/scarb/): *v2.6.0*
- [Starknet Foundry](https://foundry-rs.github.io/starknet-foundry/index.html) *v0.26.0*

We recommend installing dependencies using [asdf](https://asdf-vm.com/):

```bash
asdf plugin add scarb
asdf install scarb 2.5.4
asdf install scarb 2.6.0
asdf plugin add starknet-foundry
asdf install starknet-foundry 0.18.0
asdf install starknet-foundry 0.26.0
```

#### Compile
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## About

[![Tests](https://img.shields.io/badge/Tests-108%20passed-brightgreen)](README.md)
[![Tests](https://img.shields.io/badge/Tests-92%20passed-brightgreen)](README.md)

Carbon Protocol V3 is a cutting-edge, open-source tool designed for the tokenization, trading, and management of carbon credits on Starknet.

Expand Down
8 changes: 4 additions & 4 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name = "carbon_v3"
version = "0.1.0"

[dependencies]
starknet = ">=2.5.3"
alexandria_storage = { git = "https://github.com/keep-starknet-strange/alexandria", tag = "cairo-v2.5.4" }
alexandria_numeric = { git = "https://github.com/keep-starknet-strange/alexandria", tag = "cairo-v2.5.4" }
starknet = ">=2.6.0"
alexandria_storage = { git = "https://github.com/keep-starknet-strange/alexandria", tag = "cairo-v2.6.0" }
alexandria_numeric = { git = "https://github.com/keep-starknet-strange/alexandria", tag = "cairo-v2.6.0" }
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.10.0" }
erc4906 = { git = "https://github.com/carbonable-labs/cairo-erc-4906" }

[dev-dependencies]
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.18.0" }
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.26.0" }

[scripts]
test = "snforge test"
Expand Down
6 changes: 3 additions & 3 deletions src/components/metadata.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ mod TestMetadataComponent {

#[test]
fn test_metadata() {
let class = declare('TestContract');
let metadata_class = declare('TestMetadata');
let class = declare("TestContract").expect('Declaration failed');
let metadata_class = declare("TestMetadata").expect('Declaration failed');

let contract_address = class.deploy(@array![]).unwrap();
let (contract_address, _) = class.deploy(@array![]).expect('Deployment failed');
let dispatcher = IMetadataHandlerDispatcher { contract_address };

dispatcher.set_uri(metadata_class.class_hash);
Expand Down
Loading
Loading