From 70b3eb34eb633e9a2a01842e7d65c495bf8d9453 Mon Sep 17 00:00:00 2001 From: Nasr Date: Mon, 2 Dec 2024 18:57:42 +0700 Subject: [PATCH] c --- examples/spawn-and-move/manifest_dev.json | 6 +++--- examples/spawn-and-move/src/actions.cairo | 11 +++-------- examples/spawn-and-move/src/models.cairo | 3 --- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/examples/spawn-and-move/manifest_dev.json b/examples/spawn-and-move/manifest_dev.json index 291337ef74..057ee7d64d 100644 --- a/examples/spawn-and-move/manifest_dev.json +++ b/examples/spawn-and-move/manifest_dev.json @@ -1252,8 +1252,8 @@ }, "contracts": [ { - "address": "0x2e0a8cf3c5d1bc2a4f3ad4e401b50c9b19c490e5b33bfd333d73b3c72669b7f", - "class_hash": "0x40aa706a235ab9f4ce4c415e140856e737834de42978cecd96bf2f647ff2957", + "address": "0x7e8a52c68b243d3a86a55c04ccec2edc760252d5952566d3af4001bd6cf38f3", + "class_hash": "0x636c2cf31b094097625cb5ada96f54ee9a3f7bc6d8cde00cc85e5ef0c622c8b", "abi": [ { "type": "impl", @@ -2167,7 +2167,7 @@ }, { "members": [], - "class_hash": "0x78a98614cad448d6a653492736190834e0318f7330e67c648a8d06ebb387460", + "class_hash": "0x77018639b9a36824fe474c7c2b2ba7b9ef0f30fa54be1d1f62037dbfc01a89b", "tag": "ns-PlayerConfig", "selector": "0x3bea561c3e142a660a00d1471d7712b70695dc4ee3b173aeaefd5178f7a21af" }, diff --git a/examples/spawn-and-move/src/actions.cairo b/examples/spawn-and-move/src/actions.cairo index 9654eb6b2a..95c8d4a4d5 100644 --- a/examples/spawn-and-move/src/actions.cairo +++ b/examples/spawn-and-move/src/actions.cairo @@ -65,8 +65,6 @@ pub mod actions { name: "hello", items: array![], favorite_item: Option::None, - test: array![], - test_tuple: (1, 2, PlayerItem { item_id: 1, quantity: 100, score: 150, test: (1, 2) }) }; let mut world = self.world_default(); @@ -125,14 +123,11 @@ pub mod actions { let player = get_caller_address(); let items = array![ - PlayerItem { item_id: 1, quantity: 100, score: 150, test: (1, 2) }, - PlayerItem { item_id: 2, quantity: 50, score: -32, test: (3, 4) } + PlayerItem { item_id: 1, quantity: 100, score: 150 }, + PlayerItem { item_id: 2, quantity: 50, score: -32 } ]; - let item = items[0].clone(); - let config = PlayerConfig { player, name, items, favorite_item: Option::Some(1), test: array![ - array![Option::Some(item)], - ], test_tuple: (1, 2, item) }; + let config = PlayerConfig { player, name, items, favorite_item: Option::Some(1) }; world.write_model(@config); } diff --git a/examples/spawn-and-move/src/models.cairo b/examples/spawn-and-move/src/models.cairo index bb7ea288e4..fc389d2cc9 100644 --- a/examples/spawn-and-move/src/models.cairo +++ b/examples/spawn-and-move/src/models.cairo @@ -75,7 +75,6 @@ pub struct PlayerItem { pub item_id: u32, pub quantity: u32, pub score: i32, - pub test: (u32, u32), } #[derive(Drop, Serde)] @@ -86,8 +85,6 @@ pub struct PlayerConfig { pub name: ByteArray, pub items: Array, pub favorite_item: Option, - pub test: Array>>, - pub test_tuple: (u32, u32, PlayerItem), } #[derive(Drop, Serde)]