Skip to content

Commit 1ddafcb

Browse files
committed
chore: bump dojo version
1 parent 81e49e9 commit 1ddafcb

38 files changed

+131
-189
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
pull_request:
88

99
env:
10-
DOJO_VERSION: v1.6.1
11-
SCARB_VERSION: 2.10.1
10+
SCARB_VERSION: 2.12.2
1211

1312
jobs:
1413
check:
@@ -29,9 +28,11 @@ jobs:
2928
name: Build workspace
3029
steps:
3130
- uses: actions/checkout@v4
32-
- uses: ./.github/actions/setup
31+
- uses: software-mansion/setup-scarb@v1
32+
with:
33+
scarb-version: ${{ env.SCARB_VERSION }}
3334
- name: Build
34-
run: sozo build
35+
run: scarb build
3536
shell: bash
3637

3738
algebra:
@@ -43,9 +44,8 @@ jobs:
4344
- uses: software-mansion/setup-scarb@v1
4445
with:
4546
scarb-version: ${{ env.SCARB_VERSION }}
46-
- uses: ./.github/actions/setup
4747
- name: Test
48-
run: sozo test --package origami_algebra
48+
run: scarb test --package origami_algebra
4949
shell: bash
5050

5151
defi:
@@ -57,9 +57,8 @@ jobs:
5757
- uses: software-mansion/setup-scarb@v1
5858
with:
5959
scarb-version: ${{ env.SCARB_VERSION }}
60-
- uses: ./.github/actions/setup
6160
- name: Test
62-
run: sozo test --package origami_defi
61+
run: scarb test --package origami_defi
6362
shell: bash
6463

6564
map:
@@ -71,9 +70,8 @@ jobs:
7170
- uses: software-mansion/setup-scarb@v1
7271
with:
7372
scarb-version: ${{ env.SCARB_VERSION }}
74-
- uses: ./.github/actions/setup
7573
- name: Test
76-
run: sozo test --package origami_map
74+
run: scarb test --package origami_map
7775
shell: bash
7876

7977
random:
@@ -85,9 +83,8 @@ jobs:
8583
- uses: software-mansion/setup-scarb@v1
8684
with:
8785
scarb-version: ${{ env.SCARB_VERSION }}
88-
- uses: ./.github/actions/setup
8986
- name: Test
90-
run: sozo test --package origami_random
87+
run: scarb test --package origami_random
9188
shell: bash
9289

9390
rating:
@@ -99,9 +96,8 @@ jobs:
9996
- uses: software-mansion/setup-scarb@v1
10097
with:
10198
scarb-version: ${{ env.SCARB_VERSION }}
102-
- uses: ./.github/actions/setup
10399
- name: Test
104-
run: sozo test --package origami_rating
100+
run: scarb test --package origami_rating
105101
shell: bash
106102

107103
security:
@@ -113,7 +109,6 @@ jobs:
113109
- uses: software-mansion/setup-scarb@v1
114110
with:
115111
scarb-version: ${{ env.SCARB_VERSION }}
116-
- uses: ./.github/actions/setup
117112
- name: Test
118-
run: sozo test --package origami_security
113+
run: scarb test --package origami_security
119114
shell: bash

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
scarb 2.10.1
1+
scarb 2.12.2

Scarb.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[workspace]
22
members = [
3+
"crates/contracts",
34
"crates/algebra",
45
"crates/defi",
56
"crates/map",
@@ -13,8 +14,6 @@ version = "1.1.2"
1314
edition = "2024_07"
1415

1516
[workspace.dependencies]
16-
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.6.1" }
17-
# dojo = { path = "../dojo/crates/dojo-core" }
1817
cubit = { git = "https://github.com/bengineer42/cubit", branch = "bump-cairo-gt-2.8" }
19-
starknet = "^2.10.1"
20-
cairo_test = "^2.10.1"
18+
starknet = "^2.12.2"
19+
cairo_test = "^2.12.2"

crates/Scarb.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ homepage = "https://github.com/dojoengine/origami/tree/main/crates"
99
[dependencies]
1010
cubit.workspace = true
1111
dojo.workspace = true
12+
13+
[dev-dependencies]
1214
cairo_test.workspace = true

crates/algebra/Scarb.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ edition.workspace = true
55
description = "Algebra library for Dojo based games."
66
homepage = "https://github.com/dojoengine/origami/tree/main/crates/algebra"
77

8-
# TODO: update to edition 2024_07, some traits are deprecated and others no longer accessible.
9-
# Mostly related to `AddEq` -> `AddAssign` and so on.
10-
118
[dependencies]
129
cubit.workspace = true
10+
11+
[dev-dependencies]
1312
cairo_test.workspace = true

crates/algebra/src/lib.cairo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
mod matrix;
12
mod vec2;
23
mod vector;
3-
mod matrix;

crates/algebra/src/matrix.cairo

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl MatrixImpl<
6565
let col = index / self.rows;
6666
values.append(self.get(row, col));
6767
index += 1;
68-
};
68+
}
6969
MatrixTrait::new(values.span(), self.cols, self.rows)
7070
}
7171

@@ -76,17 +76,17 @@ impl MatrixImpl<
7676
loop {
7777
if index == max_index {
7878
break;
79-
};
79+
}
8080

8181
let row = index / self.cols;
8282
let col = index % self.cols;
8383

8484
if row != exclude_row && col != exclude_col {
8585
values.append(self.get(row, col));
86-
};
86+
}
8787

8888
index += 1;
89-
};
89+
}
9090

9191
MatrixTrait::new(values.span(), self.cols - 1, self.rows - 1)
9292
}
@@ -115,10 +115,10 @@ impl MatrixImpl<
115115
det += coef * minor.det();
116116
} else {
117117
det -= coef * minor.det();
118-
};
118+
}
119119

120120
col += 1;
121-
};
121+
}
122122

123123
return det;
124124
}
@@ -151,7 +151,7 @@ impl MatrixImpl<
151151
values.append(cofactor / determinant);
152152

153153
index += 1;
154-
};
154+
}
155155

156156
MatrixTrait::new(values.span(), self.cols, self.rows)
157157
}
@@ -184,7 +184,7 @@ impl MatrixAdd<
184184
let col = index % lhs.cols;
185185
values.append(lhs.get(row, col) + rhs.get(row, col));
186186
index += 1;
187-
};
187+
}
188188
MatrixTrait::new(values.span(), lhs.rows, lhs.cols)
189189
}
190190
}
@@ -216,7 +216,7 @@ impl MatrixSub<
216216
let col = index % lhs.cols;
217217
values.append(lhs.get(row, col) - rhs.get(row, col));
218218
index += 1;
219-
};
219+
}
220220
MatrixTrait::new(values.span(), lhs.rows, lhs.cols)
221221
}
222222
}
@@ -257,10 +257,10 @@ impl MatrixMul<
257257

258258
sum += lhs.get(row, k) * rhs.get(k, col);
259259
k += 1;
260-
};
260+
}
261261
values.append(sum);
262262
index += 1;
263-
};
263+
}
264264

265265
MatrixTrait::new(values.span(), lhs.rows, rhs.cols)
266266
}

crates/algebra/src/vector.cairo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use core::ops::AddAssign;
21
use core::num::traits::Zero;
2+
use core::ops::AddAssign;
33

44
#[derive(Copy, Drop)]
55
struct Vector<T> {
@@ -66,7 +66,7 @@ impl VectorAdd<
6666
}
6767
values.append(lhs.get(index) + rhs.get(index));
6868
index += 1;
69-
};
69+
}
7070
VectorTrait::new(values.span())
7171
}
7272
}
@@ -86,7 +86,7 @@ impl VectorSub<
8686
}
8787
values.append(lhs.get(index) - rhs.get(index));
8888
index += 1;
89-
};
89+
}
9090
VectorTrait::new(values.span())
9191
}
9292
}

crates/defi/Scarb.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ homepage = "https://github.com/dojoengine/origami/tree/main/crates/defi"
88
[dependencies]
99
cubit.workspace = true
1010
starknet.workspace = true
11+
12+
[dev-dependencies]
1113
cairo_test.workspace = true

0 commit comments

Comments
 (0)