File tree Expand file tree Collapse file tree 12 files changed +40
-32
lines changed
clients/react/react-app/src Expand file tree Collapse file tree 12 files changed +40
-32
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ function App() {
1717 account,
1818 } = useDojo ( ) ;
1919
20+ // sync entities
2021 useQuerySync ( toriiClient , contractComponents as any , [ ] ) ;
2122
2223 const [ clipboardStatus , setClipboardStatus ] = useState ( {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { world } from "./world";
77import { setupWorld } from "./typescript/contracts.gen" ;
88import { Account , ArraySignatureType } from "starknet" ;
99import { BurnerManager } from "@dojoengine/create-burner" ;
10- import { getSyncEvents } from "@dojoengine/state" ;
10+ import { getSyncEvents , getSyncEntities } from "@dojoengine/state" ;
1111
1212export type SetupResult = Awaited < ReturnType < typeof setup > > ;
1313
@@ -29,13 +29,21 @@ export async function setup({ ...config }: DojoConfig) {
2929 // create dojo provider
3030 const dojoProvider = new DojoProvider ( config . manifest , config . rpcUrl ) ;
3131
32+ // Sync all events
3233 const eventSync = getSyncEvents (
3334 toriiClient ,
3435 contractComponents as any ,
3536 undefined ,
3637 [ ]
3738 ) ;
3839
40+ // Sync all entities
41+ const sync = await getSyncEntities (
42+ toriiClient ,
43+ contractComponents as any ,
44+ [ ]
45+ ) ;
46+
3947 // setup world
4048 const client = await setupWorld ( dojoProvider ) ;
4149
@@ -75,5 +83,6 @@ export async function setup({ ...config }: DojoConfig) {
7583 burnerManager,
7684 toriiClient,
7785 eventSync,
86+ sync,
7887 } ;
7988}
Original file line number Diff line number Diff line change 1010 steps :
1111 - uses : actions/checkout@v3
1212 - run : curl -L https://install.dojoengine.org | bash
13- - run : /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.6
13+ - run : /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.9
1414 - run : |
1515 /home/runner/.config/.dojo/bin/sozo build
1616 /home/runner/.config/.dojo/bin/sozo test
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ sozo build
4141sozo migrate apply
4242
4343# Start Torii
44- torii --world 0x403b5f047b8c4797139e30801e310473d99ca6877d19e0f27506f353f8f70f7 --allowed-origins " *"
44+ torii --world 0x3b34889efbdf01f707d5d7421f112e8fb85a42fb6f2e5422c75ce3253148b0e --allowed-origins " *"
4545```
4646
4747---
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ version = 1
44[[package]]
55name = "dojo"
66version = "1.0.0-alpha.4"
7- source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.6#ede7930735c708572af8a87f81bb76354a401b3a "
7+ source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.9#e42ce0c220a59d75c5b08e87a81de12cfdc27a55 "
88dependencies = [
99 "dojo_plugin",
1010]
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ spawn = "./scripts/spawn.sh"
1212move = " ./scripts/move.sh"
1313
1414[dependencies ]
15- dojo = { git = " https://github.com/dojoengine/dojo" , tag = " v1.0.0-alpha.6 " }
15+ dojo = { git = " https://github.com/dojoengine/dojo" , tag = " v1.0.0-alpha.9 " }
1616
1717[[target .dojo ]]
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ rpc_url = "http://localhost:5050/"
2020# Default account for katana with seed = 0
2121account_address = " 0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca"
2222private_key = " 0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a"
23- world_address = " 0x403b5f047b8c4797139e30801e310473d99ca6877d19e0f27506f353f8f70f7 "
23+ world_address = " 0x3b34889efbdf01f707d5d7421f112e8fb85a42fb6f2e5422c75ce3253148b0e "
Original file line number Diff line number Diff line change 11kind = " DojoContract"
2- class_hash = " 0x4f10da1ba615523c1a4b9e2ad40df134edbcf2d971a1074efbd9772c86c2173 "
3- original_class_hash = " 0x4f10da1ba615523c1a4b9e2ad40df134edbcf2d971a1074efbd9772c86c2173 "
2+ class_hash = " 0x7304354bfea03508e0a8beaca98c9580c852a0e350b74dcafb55192c62fa3f4 "
3+ original_class_hash = " 0x7304354bfea03508e0a8beaca98c9580c852a0e350b74dcafb55192c62fa3f4 "
44base_class_hash = " 0x0"
55abi = " manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json"
66reads = []
Original file line number Diff line number Diff line change 11kind = " Class"
2- class_hash = " 0x458d0ce5b14a4844092bdb62050f462d53362304a13febbac6d973691d61be2 "
3- original_class_hash = " 0x458d0ce5b14a4844092bdb62050f462d53362304a13febbac6d973691d61be2 "
2+ class_hash = " 0xa349b743d361ce4567361475a89b84a386bb383448c6926954e5fe0b525597 "
3+ original_class_hash = " 0xa349b743d361ce4567361475a89b84a386bb383448c6926954e5fe0b525597 "
44abi = " manifests/dev/base/abis/dojo-world.json"
55tag = " dojo-world"
66manifest_name = " dojo-world"
Original file line number Diff line number Diff line change 11{
22 "world" : {
33 "kind" : " WorldContract" ,
4- "class_hash" : " 0x458d0ce5b14a4844092bdb62050f462d53362304a13febbac6d973691d61be2 " ,
5- "original_class_hash" : " 0x458d0ce5b14a4844092bdb62050f462d53362304a13febbac6d973691d61be2 " ,
4+ "class_hash" : " 0xa349b743d361ce4567361475a89b84a386bb383448c6926954e5fe0b525597 " ,
5+ "original_class_hash" : " 0xa349b743d361ce4567361475a89b84a386bb383448c6926954e5fe0b525597 " ,
66 "abi" : [
77 {
88 "type" : " impl" ,
12291229 ]
12301230 }
12311231 ],
1232- "address" : " 0x403b5f047b8c4797139e30801e310473d99ca6877d19e0f27506f353f8f70f7 " ,
1233- "transaction_hash" : " 0x12df6c5a6c89d2c128c96026395f1f8917c36a7864aca26f0c7b9e2ea152bca " ,
1232+ "address" : " 0x3b34889efbdf01f707d5d7421f112e8fb85a42fb6f2e5422c75ce3253148b0e " ,
1233+ "transaction_hash" : " 0x4729b83525f0dddbfce0afd73e0b6a39303de51690efd756691356c21c30067 " ,
12341234 "block_number" : 3 ,
12351235 "seed" : " dojo_starter" ,
12361236 "metadata" : {
12501250 "contracts" : [
12511251 {
12521252 "kind" : " DojoContract" ,
1253- "address" : " 0x36e4506b35e6dfb301d437c95f74b3e1f4f82da5d8841bec894bb8de29ec13 " ,
1254- "class_hash" : " 0x4f10da1ba615523c1a4b9e2ad40df134edbcf2d971a1074efbd9772c86c2173 " ,
1255- "original_class_hash" : " 0x4f10da1ba615523c1a4b9e2ad40df134edbcf2d971a1074efbd9772c86c2173 " ,
1253+ "address" : " 0x5e8df8a235031ba8e66e590a7289d27d7d54c026bcdbda62b791c0a69055225 " ,
1254+ "class_hash" : " 0x7304354bfea03508e0a8beaca98c9580c852a0e350b74dcafb55192c62fa3f4 " ,
1255+ "original_class_hash" : " 0x7304354bfea03508e0a8beaca98c9580c852a0e350b74dcafb55192c62fa3f4 " ,
12561256 "base_class_hash" : " 0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" ,
12571257 "abi" : [
12581258 {
You can’t perform that action at this time.
0 commit comments