Skip to content

Commit

Permalink
move to edition 2023_11
Browse files Browse the repository at this point in the history
  • Loading branch information
remybar committed Jul 17, 2024
1 parent e259d35 commit f403848
Show file tree
Hide file tree
Showing 138 changed files with 878 additions and 29,363 deletions.
8 changes: 0 additions & 8 deletions crates/dojo-core/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,3 @@ version = 1
[[package]]
name = "dojo"
version = "0.7.3"
dependencies = [
"dojo_plugin",
]

[[package]]
name = "dojo_plugin"
version = "0.7.2"
source = "git+https://github.com/dojoengine/dojo?tag=v0.7.3#e8539d5b199efbd51c89c75da32f6592de5d9262"
11 changes: 5 additions & 6 deletions crates/dojo-core/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@

[package]
cairo-version = "=2.6.4"
description = "The Dojo Core library for autonomous worlds."
edition = "2023_11"
name = "dojo"
version = "0.7.3"

[dependencies]
dojo_plugin = { git = "https://github.com/dojoengine/dojo", tag = "v0.7.3" }
starknet = "=2.6.4"

# Dojo core is tested with sozo, hence we need a namespace for the test
# command to work.
[tool.dojo.world]
namespace = { default = "dojo" }
[[target.starknet-contract]]
sierra = true

2 changes: 1 addition & 1 deletion crates/dojo-core/src/base.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use dojo::world::IWorldDispatcher;

#[starknet::contract]
mod base {
pub mod base {
use starknet::{ClassHash, get_caller_address};
use dojo::world::IWorldDispatcher;
use dojo::world::IWorldProvider;
Expand Down
15 changes: 7 additions & 8 deletions crates/dojo-core/src/base_test.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use debug::PrintTrait;
use option::OptionTrait;
use core::option::OptionTrait;
use starknet::ClassHash;
use traits::TryInto;
use core::traits::TryInto;

use dojo::base::base;
use dojo::components::upgradeable::{IUpgradeableDispatcher, IUpgradeableDispatcherTrait};
Expand All @@ -10,37 +9,37 @@ use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait};


#[starknet::contract]
mod contract_upgrade {
pub mod contract_upgrade {
use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait, IWorldProvider};

#[storage]
struct Storage {}

#[starknet::interface]
trait IQuantumLeap<TState> {
pub trait IQuantumLeap<TState> {
fn plz_more_tps(self: @TState) -> felt252;
}

#[constructor]
fn constructor(ref self: ContractState) {}

#[abi(embed_v0)]
impl QuantumLeap of IQuantumLeap<ContractState> {
pub impl QuantumLeap of IQuantumLeap<ContractState> {
fn plz_more_tps(self: @ContractState) -> felt252 {
'daddy'
}
}

#[abi(embed_v0)]
impl WorldProviderImpl of IWorldProvider<ContractState> {
pub impl WorldProviderImpl of IWorldProvider<ContractState> {
fn world(self: @ContractState) -> IWorldDispatcher {
IWorldDispatcher { contract_address: starknet::contract_address_const::<'world'>() }
}
}
}

#[starknet::contract]
mod contract_invalid_upgrade {
pub mod contract_invalid_upgrade {
#[storage]
struct Storage {}
}
Expand Down
Loading

0 comments on commit f403848

Please sign in to comment.