Skip to content

Commit

Permalink
Update to dojo v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Matth26 committed Nov 19, 2024
1 parent 3173dfc commit f6676f2
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 68 deletions.
2 changes: 1 addition & 1 deletion client/src/dojo/contractModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function defineContractComponents(world: World) {
metadata: {
namespace: "zkube",
name: "Mint",
types: ["felt252", "u64", "u64"],
types: ["felt252", "u32", "u64"],
customTypes: [],
},
},
Expand Down
2 changes: 0 additions & 2 deletions client/src/dojo/contractSystems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export interface Rename extends Signer {
export interface Start extends Signer {
token_id: bigint;
mode: number;
price: bigint;
x: bigint;
y: bigint;
c: bigint;
Expand Down Expand Up @@ -172,7 +171,6 @@ export async function setupWorld(provider: DojoProvider, config: Config) {
account,
token_id,
mode,
price,
x,
y,
c,
Expand Down
2 changes: 1 addition & 1 deletion client/src/dojo/systems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function systems({ client }: { client: IWorld }) {

// Wait for the transaction to complete
const transaction = await account.waitForTransaction(transaction_hash, {
retryInterval: 50,
retryInterval: 200,
});

// Notify success or error using the same toastId
Expand Down
1 change: 0 additions & 1 deletion client/src/ui/actions/Start.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ export const Start: React.FC<StartProps> = ({ mode, handleGameMode }) => {
account: account as Account,
token_id,
mode: new Mode(mode).into(),
price: settings.game_price,
seed,
x: proof_gamma_x,
y: proof_gamma_y,
Expand Down
5 changes: 1 addition & 4 deletions client/src/ui/components/MobileHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { faBars, faCoins, faWallet } from "@fortawesome/free-solid-svg-icons";
import { faBars, faCoins } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
Drawer,
Expand All @@ -10,7 +10,6 @@ import {
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
Expand All @@ -28,8 +27,6 @@ import CollectiveTreasureChest from "./TreasureChest";
import { useState } from "react";
import { Surrender } from "../actions/Surrender";
import LevelIndicator from "./LevelIndicator";
import HeaderNftBalance from "./HeaderNftBalance";
import { useMediaQuery } from "react-responsive";
import { Controller } from "./Controller";

const MobileHeader = () => {
Expand Down
18 changes: 9 additions & 9 deletions contracts/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,33 +54,33 @@ dependencies = [
]

[[package]]
name = "bushido_trophy"
name = "arcade_trophy"
version = "0.0.0"
source = "git+https://github.com/cartridge-gg/bushido?branch=bump_version_rc2#9a1460b793449e85881054c213e2aa57cd094960"
source = "git+https://github.com/cartridge-gg/arcade?tag=v1.0.1#7efb540350e03b56b883fb6e87837fd870f58f47"
dependencies = [
"dojo",
]

[[package]]
name = "dojo"
version = "1.0.0-rc.0"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.2#6725a8f20af56213fa7382aa1e158817f3ee623c"
version = "1.0.1"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.1#d7335e6f5c76a1dda887ec00c594c2c019b4a05f"
dependencies = [
"dojo_plugin",
]

[[package]]
name = "dojo_cairo_test"
version = "1.0.0-rc.0"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.2#6725a8f20af56213fa7382aa1e158817f3ee623c"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.1#d7335e6f5c76a1dda887ec00c594c2c019b4a05f"
dependencies = [
"dojo",
]

[[package]]
name = "dojo_plugin"
version = "2.8.4"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-rc.2#6725a8f20af56213fa7382aa1e158817f3ee623c"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.1#d7335e6f5c76a1dda887ec00c594c2c019b4a05f"

[[package]]
name = "openzeppelin"
Expand Down Expand Up @@ -202,7 +202,7 @@ checksum = "sha256:725b212839f3eddc32791408609099c5e808c167ca0cf331d8c1d778b07a4
[[package]]
name = "origami_random"
version = "1.0.0-rc.2"
source = "git+https://github.com/dojoengine/origami?tag=v1.0.0-rc.2#6447deb00449423a5857a5b2f1f6cb21ffe01bf2"
source = "git+https://github.com/dojoengine/origami?tag=v1.0.1#8e9a2bd3a3c0624102243d3956b31809aa532581"

[[package]]
name = "stark_vrf"
Expand All @@ -211,10 +211,10 @@ source = "git+https://github.com/dojoengine/stark-vrf?rev=5a9e81e#5a9e81ea24e708

[[package]]
name = "zkube"
version = "1.0.0-rc.2"
version = "1.0.1"
dependencies = [
"alexandria_math",
"bushido_trophy",
"arcade_trophy",
"dojo",
"dojo_cairo_test",
"openzeppelin",
Expand Down
17 changes: 10 additions & 7 deletions contracts/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zkube"
cairo-version = "=2.8.4"
version = "1.0.0-rc.2"
version = "1.0.1"

[cairo]
sierra-replace-ids = true
Expand All @@ -16,22 +16,25 @@ sepoliadev2 = "sozo --profile sepoliadev2 clean && sozo --profile sepoliadev2 bu
playground = "sozo --profile playground clean && sozo --profile playground build && sozo --profile playground migrate --walnut"
mainnet = "sozo --profile mainnet clean && sozo --profile mainnet build && sozo --profile mainnet migrate --walnut --keystore /Users/matthias/.starkli-wallets/mainnet/braavos_dojo_deployer/keystore.json --fee eth"

inspect-sepoliadev1 = "sozo --profile sepoliadev1 clean && sozo --profile sepoliadev1 build && sozo --profile sepoliadev1 inspect"
inspect-mainnet = "sozo --profile mainnet clean && sozo --profile mainnet build && sozo --profile mainnet inspect"

[dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-rc.2" }
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.1" }
alexandria_math = { git = "https://github.com/keep-starknet-strange/alexandria", rev = "78b0d51" }
bushido_trophy = { git = "https://github.com/cartridge-gg/bushido", branch = "bump_version_rc2" }
origami_random = { git = "https://github.com/dojoengine/origami", tag = "v1.0.0-rc.2" }
arcade_trophy = { git = "https://github.com/cartridge-gg/arcade", tag = "v1.0.1" }
origami_random = { git = "https://github.com/dojoengine/origami", tag = "v1.0.1" }
stark_vrf = { git = "https://github.com/dojoengine/stark-vrf", rev = "5a9e81e" }

[[target.starknet-contract]]
build-external-contracts = [
"dojo::world::world_contract::world",
"bushido_trophy::events::index::e_TrophyCreation",
"bushido_trophy::events::index::e_TrophyProgression",
"arcade_trophy::events::index::e_TrophyCreation",
"arcade_trophy::events::index::e_TrophyProgression",
]

[dev-dependencies]
dojo_cairo_test = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-rc.2" }
dojo_cairo_test = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.1" }
openzeppelin_token = "0.18.0"
openzeppelin = "0.18.0"

Expand Down
12 changes: 6 additions & 6 deletions contracts/manifest_mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@
},
{
"address": "0x1bf627132630b28542228f215f92b8eee9d2db554825be20052c63687c331e4",
"class_hash": "0x34cdd05042a06e8c3f3c85d38676521dd7fac7a217d75b6f86cd80139408658",
"class_hash": "0x2bc06e58ffaa27a9c6ca32236265ac9886682df7edc84b01ac9f49da32f78a1",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2352,7 +2352,7 @@
},
{
"address": "0x73e9da8ad935d01c0099159474b693780823e3fcb99889668a9d36bb46510f5",
"class_hash": "0x349e932ba43b3059a8cf39f2b5e0e08330568b684c32556affa9bd6c9eec6d0",
"class_hash": "0x4c1a0f460cc3936c27bddb1079f7ddc960d2e4ad41d40c3c08fece491a023b3",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2609,7 +2609,7 @@
},
{
"type": "event",
"name": "bushido_trophy::components::achievable::AchievableComponent::Event",
"name": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "enum",
"variants": []
},
Expand All @@ -2630,7 +2630,7 @@
},
{
"name": "AchievableEvent",
"type": "bushido_trophy::components::achievable::AchievableComponent::Event",
"type": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "flat"
}
]
Expand Down Expand Up @@ -3246,13 +3246,13 @@
"events": [
{
"members": [],
"class_hash": "0x3c90ca93f00abca2c554412ea9a21cbb46ed193f1e68b309484e4288caaf7d2",
"class_hash": "0x63b7a958b4eed370f1807a66a6b8820d238d2676cc27bba35d7c60bbf2c21ef",
"tag": "zkube-TrophyCreation",
"selector": "0xc0be59b90105c870702c71ad28232a4c5246c52bdbcaa00d62c68949ccdffd"
},
{
"members": [],
"class_hash": "0x1fac79c657849151aacf0f1d283a961b2d6d2a1ab6fedde530224a289116a85",
"class_hash": "0x1f22af6dbce1f36057f13e367b10fe18cf075d90273c26e3824ddc17f8fef37",
"tag": "zkube-TrophyProgression",
"selector": "0x17b14454c7075d73430699a7e57cfb3aaa40a094fcf81c2afac7fa95667c8ec"
}
Expand Down
12 changes: 6 additions & 6 deletions contracts/manifest_sepoliadev1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@
},
{
"address": "0x33bf9876eecb5809fd8a958b8fbab6eb39dc76ae9dc6fc169340ae275b8d6a4",
"class_hash": "0x34cdd05042a06e8c3f3c85d38676521dd7fac7a217d75b6f86cd80139408658",
"class_hash": "0x2bc06e58ffaa27a9c6ca32236265ac9886682df7edc84b01ac9f49da32f78a1",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2352,7 +2352,7 @@
},
{
"address": "0x74b1bce2dedf6b73c2474d7d01a1b109c4992a1af2aae2535721ae7db02b448",
"class_hash": "0x349e932ba43b3059a8cf39f2b5e0e08330568b684c32556affa9bd6c9eec6d0",
"class_hash": "0x4c1a0f460cc3936c27bddb1079f7ddc960d2e4ad41d40c3c08fece491a023b3",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2609,7 +2609,7 @@
},
{
"type": "event",
"name": "bushido_trophy::components::achievable::AchievableComponent::Event",
"name": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "enum",
"variants": []
},
Expand All @@ -2630,7 +2630,7 @@
},
{
"name": "AchievableEvent",
"type": "bushido_trophy::components::achievable::AchievableComponent::Event",
"type": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "flat"
}
]
Expand Down Expand Up @@ -3246,13 +3246,13 @@
"events": [
{
"members": [],
"class_hash": "0x3c90ca93f00abca2c554412ea9a21cbb46ed193f1e68b309484e4288caaf7d2",
"class_hash": "0x63b7a958b4eed370f1807a66a6b8820d238d2676cc27bba35d7c60bbf2c21ef",
"tag": "zkube-TrophyCreation",
"selector": "0xc0be59b90105c870702c71ad28232a4c5246c52bdbcaa00d62c68949ccdffd"
},
{
"members": [],
"class_hash": "0x1fac79c657849151aacf0f1d283a961b2d6d2a1ab6fedde530224a289116a85",
"class_hash": "0x1f22af6dbce1f36057f13e367b10fe18cf075d90273c26e3824ddc17f8fef37",
"tag": "zkube-TrophyProgression",
"selector": "0x17b14454c7075d73430699a7e57cfb3aaa40a094fcf81c2afac7fa95667c8ec"
}
Expand Down
29 changes: 6 additions & 23 deletions contracts/manifest_slotdev.json
Original file line number Diff line number Diff line change
Expand Up @@ -1460,12 +1460,7 @@
"init_calldata": [],
"tag": "zkube-account",
"selector": "0x6d28004d278bad46f01e5d8d1943b63b32617bdc735f34355e0c7e39310d4e7",
"systems": [
"dojo_init",
"create",
"rename",
"upgrade"
]
"systems": ["dojo_init", "create", "rename", "upgrade"]
},
{
"address": "0xf0a56bd4517ffe572c6f9baa4237a05471b2cb30e787d7d79250b0625c8ddc",
Expand Down Expand Up @@ -2609,7 +2604,7 @@
},
{
"type": "event",
"name": "bushido_trophy::components::achievable::AchievableComponent::Event",
"name": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "enum",
"variants": []
},
Expand All @@ -2630,7 +2625,7 @@
},
{
"name": "AchievableEvent",
"type": "bushido_trophy::components::achievable::AchievableComponent::Event",
"type": "arcade_trophy::components::achievable::AchievableComponent::Event",
"kind": "flat"
}
]
Expand Down Expand Up @@ -2940,13 +2935,7 @@
],
"tag": "zkube-tournament",
"selector": "0x2101600e00aa39f4136a59a187bd5e197b9f3c63e08d17626effe44b379f1f5",
"systems": [
"dojo_init",
"claim",
"sponsor_from",
"sponsor",
"upgrade"
]
"systems": ["dojo_init", "claim", "sponsor_from", "sponsor", "upgrade"]
},
{
"address": "0x50c3f84f5a048a8e75789acb14931381b258c822ed1b779d1053ae83ea13a11",
Expand Down Expand Up @@ -3184,13 +3173,7 @@
],
"tag": "zkube-zkorp",
"selector": "0x6cdc1046f821af7bd6d6c3a1326826e049bd14a3d8329ce42ed30430eb3b678",
"systems": [
"dojo_init",
"claim",
"sponsor",
"sponsor_from",
"upgrade"
]
"systems": ["dojo_init", "claim", "sponsor", "sponsor_from", "upgrade"]
}
],
"models": [
Expand Down Expand Up @@ -3257,4 +3240,4 @@
"selector": "0x17b14454c7075d73430699a7e57cfb3aaa40a094fcf81c2afac7fa95667c8ec"
}
]
}
}
2 changes: 1 addition & 1 deletion contracts/src/components/hostable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod HostableComponent {

// External imports

use bushido_trophy::store::{Store as BushidoStore, StoreTrait as BushidoStoreTrait};
use arcade_trophy::store::{Store as BushidoStore, StoreTrait as BushidoStoreTrait};

// Internal imports

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/components/playable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod PlayableComponent {

// External imports

use bushido_trophy::store::{Store as BushidoStore, StoreTrait as BushidoStoreTrait};
use arcade_trophy::store::{Store as BushidoStore, StoreTrait as BushidoStoreTrait};
use stark_vrf::ecvrf::{Proof, Point, ECVRFTrait};

// Internal imports
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/elements/trophies/interface.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bushido_trophy::types::task::{Task as BushidoTask};
use arcade_trophy::types::task::{Task as BushidoTask};
use zkube::types::task::{Task, TaskTrait};

trait TrophyTrait {
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/systems/settings.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait ISettings<T> {
mod settings {
// Component imports

use bushido_trophy::components::achievable::AchievableComponent;
use arcade_trophy::components::achievable::AchievableComponent;

// Internal imports

Expand Down
4 changes: 2 additions & 2 deletions contracts/src/tests/setup.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ mod setup {
TestResource::Model(models::m_Tournament::TEST_CLASS_HASH),
TestResource::Model(models::m_Mint::TEST_CLASS_HASH),
TestResource::Event(
bushido_trophy::events::index::e_TrophyCreation::TEST_CLASS_HASH
arcade_trophy::events::index::e_TrophyCreation::TEST_CLASS_HASH
),
TestResource::Event(
bushido_trophy::events::index::e_TrophyProgression::TEST_CLASS_HASH
arcade_trophy::events::index::e_TrophyProgression::TEST_CLASS_HASH
),
TestResource::Contract(account::TEST_CLASS_HASH),
TestResource::Contract(play::TEST_CLASS_HASH),
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/types/task.cairo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// External imports

use bushido_trophy::types::task::{Task as BushidoTask, TaskTrait as BushidoTaskTrait};
use arcade_trophy::types::task::{Task as BushidoTask, TaskTrait as BushidoTaskTrait};

// Internal imports

Expand Down
Loading

0 comments on commit f6676f2

Please sign in to comment.