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

[CHORE] Bump versions #383

Merged
merged 4 commits into from
Dec 13, 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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
uses: actions/checkout@master

- name: Install scarb
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.8.2
run: curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.9.2

- name: Install snfoundryup
run: curl -L https://raw.githubusercontent.com/foundry-rs/starknet-foundry/master/scripts/install.sh | sh

- name: Install snforge
run: snfoundryup -v 0.30.0
run: snfoundryup -v 0.34.0

- name: Run snforge tests
run: snforge test
Expand Down
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scarb 2.8.3
starknet-foundry 0.31.0
starknet-devnet 0.2.0
scarb 2.9.2
starknet-foundry 0.34.0
starknet-devnet 0.2.3
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ Before you begin, you need to install the following tools:

### Starknet-devnet version

To ensure the proper functioning of scaffold-stark, your local `starknet-devnet` version must be `0.2.0`. To accomplish this, first check your local starknet-devnet version:
To ensure the proper functioning of scaffold-stark, your local `starknet-devnet` version must be `0.2.3`. To accomplish this, first check your local starknet-devnet version:

```sh
starknet-devnet --version
```

If your local starknet-devnet version is not `0.2.0`, you need to install it.
If your local starknet-devnet version is not `0.2.3`, you need to install it.

- Install Starknet-devnet `0.2.0` via `asdf` ([instructions](https://github.com/gianalarcon/asdf-starknet-devnet/blob/main/README.md)).
- Install Starknet-devnet `0.2.3` via `asdf` ([instructions](https://github.com/gianalarcon/asdf-starknet-devnet/blob/main/README.md)).

### Scarb version

To ensure the proper functioning of scaffold-stark, your local `Scarb` version must be `2.8.3`. To accomplish this, first check your local Scarb version:
To ensure the proper functioning of scaffold-stark, your local `Scarb` version must be `2.9.2`. To accomplish this, first check your local Scarb version:

```sh
scarb --version
```

If your local Scarb version is not `2.8.3`, you need to install it.
If your local Scarb version is not `2.9.2`, you need to install it.

- Install Scarb `2.8.3` via `asdf` ([instructions](https://docs.swmansion.com/scarb/download.html#install-via-asdf)).
- Install Scarb `2.9.2` via `asdf` ([instructions](https://docs.swmansion.com/scarb/download.html#install-via-asdf)).

### Starknet Foundry version

Expand All @@ -61,16 +61,16 @@ To ensure the proper functioning of the tests on scaffold-stark, your Starknet F
snforge --version
```

If your Starknet Foundry version is not `0.31.0`, you need to install it.
If your Starknet Foundry version is not `0.34.0`, you need to install it.

- Install Starknet Foundry `0.31.0` via `asdf` ([instructions](https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html#installation-via-asdf)).
- Install Starknet Foundry `0.34.0` via `asdf` ([instructions](https://foundry-rs.github.io/starknet-foundry/getting-started/installation.html#installation-via-asdf)).

## Compatible versions

- Starknet-devnet - v0.2.0
- Scarb - v2.8.3
- Snforge - v0.31.0
- Cairo - v2.8.2
- Starknet-devnet - v0.2.3
- Scarb - v2.9.2
- Snforge - v0.34.0
- Cairo - v2.9.2
- Rpc - v0.7.1

## Quickstart with Starknet-Devnet
Expand Down
42 changes: 16 additions & 26 deletions packages/snfoundry/contracts/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,68 +13,58 @@ dependencies = [

[[package]]
name = "openzeppelin_access"
version = "0.17.0"
version = "0.20.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:541bb8fdf1ad17fe0d275b00acb9f0d7f56ea5534741e21535ac3fda2c600281"
checksum = "sha256:7734901a0ca7a7065e69416fea615dd1dc586c8dc9e76c032f25ee62e8b2a06c"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_account"
version = "0.17.0"
version = "0.20.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:c4e11609fdd1f4c3d3004cd1468711bd2ea664739c9e59a4b270567fe4c23ee3"
checksum = "sha256:1aa3a71e2f40f66f98d96aa9bf9f361f53db0fd20fa83ef7df04426a3c3a926a"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_governance"
version = "0.17.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:b7e0142d88d69a8c367aea8c9dc7f659f27372551efc23f39a0cf71a189c1302"
dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
]

[[package]]
name = "openzeppelin_introspection"
version = "0.17.0"
version = "0.20.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:892433a4a1ea0fc9cf7cdb01e06ddc2782182abcc188e4ea5dd480906d006cf8"
checksum = "sha256:13e04a2190684e6804229a77a6c56de7d033db8b9ef519e5e8dee400a70d8a3d"

[[package]]
name = "openzeppelin_token"
version = "0.17.0"
version = "0.20.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:77997a7e217b69674c34b402dc0c7b2210540db66a56087572679c31896eaabb"
checksum = "sha256:4452f449dc6c1ea97cf69d1d9182749abd40e85bd826cd79652c06a627eafd91"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
"openzeppelin_governance",
"openzeppelin_introspection",
"openzeppelin_utils",
]

[[package]]
name = "openzeppelin_utils"
version = "0.17.0"
version = "0.20.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:36d93e353f42fd6b824abcd8b4b51c3f5d02c893c5f886ae81403b0368aa5fde"
checksum = "sha256:44f32d242af1e43982decc49c563e613a9b67ade552f5c3d5cde504e92f74607"

[[package]]
name = "snforge_scarb_plugin"
version = "0.31.0"
version = "0.34.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:1fce075fcbf7fce1b0935f6f9a034549704837fb221da212d3b6e9134cebfdaa"
checksum = "sha256:56f2b06ff2f0d8bbdfb7fb6c211fba7e4da6e5334ea70ba849af329a739faf11"

[[package]]
name = "snforge_std"
version = "0.31.0"
version = "0.34.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:60ac980b297281f9a59a5f1668cb56bdea1b28fd2f8008008270f9a3c91ad3ba"
checksum = "sha256:bd20964bde07e6fd0f7adb50d41216f05d66abd422ed82241030369333385876"
dependencies = [
"snforge_scarb_plugin",
]
10 changes: 5 additions & 5 deletions packages/snfoundry/contracts/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ edition = "2023_11"
# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
starknet = "2.8.2"
starknet = "2.9.2"
# Change to just "openzeppelin" to use full features
openzeppelin_access = "0.17.0"
openzeppelin_token = "0.17.0"
openzeppelin_access = "0.20.0"
openzeppelin_token = "0.20.0"

[dev-dependencies]
openzeppelin_utils = "0.17.0"
snforge_std = "0.31.0"
openzeppelin_utils = "0.20.0"
snforge_std = "0.34.0"

[[target.starknet-contract]]
casm = true
Expand Down
6 changes: 3 additions & 3 deletions packages/snfoundry/contracts/src/YourContract.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod YourContract {
enum Event {
#[flat]
OwnableEvent: OwnableComponent::Event,
GreetingChanged: GreetingChanged
GreetingChanged: GreetingChanged,
}

#[derive(Drop, starknet::Event)]
Expand Down Expand Up @@ -86,8 +86,8 @@ mod YourContract {
greeting_setter: get_caller_address(),
new_greeting: self.greeting.read(),
premium: true,
value: 100
}
value: 100,
},
);
}
fn withdraw(ref self: ContractState) {
Expand Down
4 changes: 2 additions & 2 deletions packages/snfoundry/contracts/src/test/TestContract.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use contracts::YourContract::{IYourContractDispatcher, IYourContractDispatcherTrait};
use openzeppelin_token::erc20::interface::{IERC20Dispatcher, IERC20DispatcherTrait};
use openzeppelin_utils::serde::SerializedAppend;
use snforge_std::{declare, ContractClassTrait, DeclareResultTrait, cheat_caller_address, CheatSpan};
use snforge_std::{CheatSpan, ContractClassTrait, DeclareResultTrait, cheat_caller_address, declare};
use starknet::{ContractAddress, contract_address_const};

// Real contract address deployed on Sepolia
Expand Down Expand Up @@ -43,7 +43,7 @@ fn test_transfer() {
let your_contract_address = deploy_contract("YourContract");

let your_contract_dispatcher = IYourContractDispatcher {
contract_address: your_contract_address
contract_address: your_contract_address,
};
let erc20_dispatcher = IERC20Dispatcher { contract_address: eth_contract_address };
let amount_to_transfer = 500;
Expand Down
Loading