From 8e4393b6c94804016b897ab2d749950250a36f96 Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 13 Jun 2024 14:35:07 -0400 Subject: [PATCH] chore: reset actions --- .../dojo_examples_actions_actions.json | 40 ------------------- .../dojo_examples_actions_actions.toml | 4 +- examples/spawn-and-move/src/actions.cairo | 6 +-- 3 files changed, 5 insertions(+), 45 deletions(-) diff --git a/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json b/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json index a052ea7eef..21aed968a7 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json @@ -173,34 +173,6 @@ } ] }, - { - "type": "enum", - "name": "core::option::Option::<(core::integer::u32, dojo_examples::models::Vec2)>", - "variants": [ - { - "name": "Some", - "type": "(core::integer::u32, dojo_examples::models::Vec2)" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_examples::models::PlayerItem", - "members": [ - { - "name": "item_id", - "type": "core::integer::u32" - }, - { - "name": "quantity", - "type": "core::integer::u32" - } - ] - }, { "type": "interface", "name": "dojo_examples::actions::IActions", @@ -231,18 +203,6 @@ { "name": "name", "type": "core::byte_array::ByteArray" - }, - { - "name": "option", - "type": "core::option::Option::<(core::integer::u32, dojo_examples::models::Vec2)>" - }, - { - "name": "items", - "type": "core::array::Array::" - }, - { - "name": "items_items", - "type": "core::array::Array::>" } ], "outputs": [], diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml index 67238cdae5..09f30e5dfa 100644 --- a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml +++ b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml @@ -1,6 +1,6 @@ kind = "DojoContract" -class_hash = "0x6910afc015688ae45ca113e39de97cf0727115bbdcf32b9bd9852d51e4e990c" -original_class_hash = "0x6910afc015688ae45ca113e39de97cf0727115bbdcf32b9bd9852d51e4e990c" +class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" +original_class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" base_class_hash = "0x0" abi = "manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json" reads = [] diff --git a/examples/spawn-and-move/src/actions.cairo b/examples/spawn-and-move/src/actions.cairo index 8d3fa4917b..65dc16c55c 100644 --- a/examples/spawn-and-move/src/actions.cairo +++ b/examples/spawn-and-move/src/actions.cairo @@ -1,10 +1,10 @@ -use dojo_examples::models::{Direction, Position, Vec2, PlayerItem}; +use dojo_examples::models::{Direction, Position, Vec2}; #[dojo::interface] trait IActions { fn spawn(); fn move(direction: Direction); - fn set_player_config(name: ByteArray, option: Option<(u32, Vec2)>, items: Array, items_items: Array>); + fn set_player_config(name: ByteArray); } #[dojo::interface] @@ -86,7 +86,7 @@ mod actions { emit!(world, (Moved { player, direction })); } - fn set_player_config(world: IWorldDispatcher, name: ByteArray, option: Option<(u32, Vec2)>, items: Array, items_items: Array>) { + fn set_player_config(world: IWorldDispatcher, name: ByteArray) { let player = get_caller_address(); let items = array![