Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release: v1.2.0 #3020

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 74 additions & 74 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ edition = "2021"
license = "Apache-2.0"
license-file = "LICENSE"
repository = "https://github.com/dojoengine/dojo/"
version = "1.1.2"
version = "1.2.0"

[profile.performance]
codegen-units = 1
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo/core-cairo-test/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "dojo"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo_plugin",
]
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo/core/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "dojo"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo_plugin",
]
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo/core/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cairo-version = "=2.9.2"
edition = "2024_07"
description = "The Dojo Core library for autonomous worlds."
name = "dojo"
version = "1.1.2"
version = "1.2.0"

[dependencies]
starknet = "=2.9.2"
Expand Down
4 changes: 2 additions & 2 deletions crates/torii/types-test/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "dojo"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo_plugin",
]
Expand All @@ -14,7 +14,7 @@ version = "2.9.2"

[[package]]
name = "types_test"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo",
]
2 changes: 1 addition & 1 deletion crates/torii/types-test/Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cairo-version = "=2.9.2"
edition = "2024_07"
name = "types_test"
version = "1.1.2"
version = "1.2.0"

[cairo]
sierra-replace-ids = true
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "dojo"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo_plugin",
]
Expand Down
74 changes: 68 additions & 6 deletions examples/simple/manifest_dev.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"world": {
"class_hash": "0x2361c106e790c1d1bff8c9f73c9d84e9e3ac94b2d8df6db4ddd55e82c33a9b4",
"address": "0x1fdfa7a4dc649d4203d5669fb8086474a686458ea86f95027c7b9a5f10d43bb",
"class_hash": "0x7c9469d45a9cdbab775035afb48e1fa73fb35ab059fcb9dfb0a301aa973e783",
"address": "0x60ad048d25c5f97abf3056d86a06ee6df6e0c62ce2e8e2d84c010c37f4ce13c",
"seed": "simple",
"name": "simple",
"entrypoints": [
Expand All @@ -11,6 +11,7 @@
"register_event",
"register_model",
"register_contract",
"register_library",
"init_contract",
"upgrade_event",
"upgrade_model",
Expand Down Expand Up @@ -78,6 +79,10 @@
{
"name": "Unregistered",
"type": "()"
},
{
"name": "Library",
"type": "(core::starknet::class_hash::ClassHash, core::felt252)"
}
]
},
Expand Down Expand Up @@ -362,6 +367,34 @@
],
"state_mutability": "external"
},
{
"type": "function",
"name": "register_library",
"inputs": [
{
"name": "namespace",
"type": "core::byte_array::ByteArray"
},
{
"name": "class_hash",
"type": "core::starknet::class_hash::ClassHash"
},
{
"name": "name",
"type": "core::byte_array::ByteArray"
},
{
"name": "version",
"type": "core::byte_array::ByteArray"
}
],
"outputs": [
{
"type": "core::starknet::class_hash::ClassHash"
}
],
"state_mutability": "external"
},
{
"type": "function",
"name": "init_contract",
Expand Down Expand Up @@ -965,6 +998,28 @@
}
]
},
{
"type": "event",
"name": "dojo::world::world_contract::world::LibraryRegistered",
"kind": "struct",
"members": [
{
"name": "name",
"type": "core::byte_array::ByteArray",
"kind": "key"
},
{
"name": "namespace",
"type": "core::byte_array::ByteArray",
"kind": "key"
},
{
"name": "class_hash",
"type": "core::starknet::class_hash::ClassHash",
"kind": "data"
}
]
},
{
"type": "event",
"name": "dojo::world::world_contract::world::EventEmitted",
Expand Down Expand Up @@ -1206,6 +1261,11 @@
"type": "dojo::world::world_contract::world::ContractInitialized",
"kind": "nested"
},
{
"name": "LibraryRegistered",
"type": "dojo::world::world_contract::world::LibraryRegistered",
"kind": "nested"
},
{
"name": "EventEmitted",
"type": "dojo::world::world_contract::world::EventEmitted",
Expand Down Expand Up @@ -1252,7 +1312,7 @@
},
"contracts": [
{
"address": "0x6bd026832b87c2374e80a6cc81cda814d5a6438a090422ea9965d9c6f5a11b",
"address": "0x68ebbbaa05b52fca16f3094070276fbf58feaaee2c439dfc3ef81ef0efcd2ce",
"class_hash": "0x4f8b513b49ec2fdb194efa3a8d041aef0e66346a6e8a9a999b1f4eb2fb17045",
"abi": [
{
Expand Down Expand Up @@ -1510,7 +1570,7 @@
]
},
{
"address": "0x927d206ade2170c687f3587b2ea656b7b39e4422c75f00ae7051ba32a32b78",
"address": "0x1bcadbe4bda190754bb85a2288471802193e54581f4bbf3edce20418027b5c2",
"class_hash": "0x61abffb3fd1eee27cba6298be11b8252c21eb3f69c8730ff44e9859e173cfb8",
"abi": [
{
Expand Down Expand Up @@ -1686,7 +1746,7 @@
]
},
{
"address": "0x7c62d68fcd656d72eb64ad6375a1907f3be1afec52caac3b742e53a26d069d8",
"address": "0x323d7847eb5698860601cf6dccd1ac95c6629eb1aa057b8ef704ffb38770e6",
"class_hash": "0x4f8b513b49ec2fdb194efa3a8d041aef0e66346a6e8a9a999b1f4eb2fb17045",
"abi": [
{
Expand Down Expand Up @@ -1944,6 +2004,7 @@
]
}
],
"libraries": [],
"models": [
{
"members": [],
Expand Down Expand Up @@ -1971,5 +2032,6 @@
"tag": "ns-EH",
"selector": "0x4c6c7772b19b700cf97d078d02a419670d11d2b689a7a3647eac311b2817ced"
}
]
],
"external_contracts": []
}
4 changes: 2 additions & 2 deletions examples/spawn-and-move/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [

[[package]]
name = "dojo"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"dojo_plugin",
]
Expand All @@ -31,7 +31,7 @@ dependencies = [

[[package]]
name = "dojo_examples"
version = "1.1.2"
version = "1.2.0"
dependencies = [
"armory",
"bestiary",
Expand Down
2 changes: 1 addition & 1 deletion examples/spawn-and-move/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
cairo-version = "=2.9.2"
name = "dojo_examples"
version = "1.1.2"
version = "1.2.0"
# Use the prelude with the less imports as possible
# from corelib.
edition = "2024_07"
Expand Down
13 changes: 1 addition & 12 deletions examples/spawn-and-move/manifest_dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,7 @@
],
"libraries": [
{
"class_hash": "0x18e785a7f62e106c199d15b41e756a2ba8a89f5d229f31a5b7e8971f7529a69",
"class_hash": "0x5d656902fe69f699ebbe0af587d01a46ecdb166daf10c70a6cf0b27555ee7fe",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2297,17 +2297,6 @@
}
],
"state_mutability": "view"
},
{
"type": "function",
"name": "test",
"inputs": [],
"outputs": [
{
"type": "core::integer::u8"
}
],
"state_mutability": "view"
}
]
},
Expand Down
3 changes: 3 additions & 0 deletions examples/spawn-and-move/src/actions.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ mod tests {
spawn_test_world, NamespaceDef, TestResource, ContractDefTrait, ContractDef,
WorldStorageTestTrait,
};
use dojo_examples::lib_math::simple_math;

use super::{actions, IActionsDispatcher, IActionsDispatcherTrait};
use crate::dungeon::dungeon;
Expand All @@ -259,6 +260,7 @@ mod tests {
TestResource::Model(m_Moves::TEST_CLASS_HASH),
TestResource::Event(actions::e_Moved::TEST_CLASS_HASH),
TestResource::Contract(actions::TEST_CLASS_HASH),
TestResource::Library((simple_math::TEST_CLASS_HASH, @"simple_math", @"0_1_0")),
]
.span(),
};
Expand Down Expand Up @@ -329,6 +331,7 @@ mod tests {
assert(
initial_position.vec.x == 10 && initial_position.vec.y == 10, 'wrong initial position',
);
assert(initial_moves.remaining == 99, 'wrong initial moves');

actions_system.move(Direction::Right(()));

Expand Down
10 changes: 1 addition & 9 deletions examples/spawn-and-move/src/lib_math.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pub trait SimpleMath<T> {
/// Decrements the value, saturating at 0.
fn decrement_saturating(self: @T, value: u8) -> u8;
fn test(self: @T) -> u8;
}

#[dojo::library]
Expand All @@ -13,14 +12,7 @@ pub mod simple_math {
#[abi(embed_v0)]
impl SimpleMathImpl of SimpleMath<ContractState> {
fn decrement_saturating(self: @ContractState, value: u8) -> u8 {
let mut v = value;
v.saturating_sub(1);

v
}

fn test(self: @ContractState) -> u8 {
2
value.saturating_sub(1)
}
}
}
Binary file modified spawn-and-move-db.tar.gz
Binary file not shown.
Binary file modified types-test-db.tar.gz
Binary file not shown.
Loading