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 de1a1de
Show file tree
Hide file tree
Showing 48 changed files with 778 additions and 779 deletions.
1 change: 1 addition & 0 deletions crates/dojo-core/Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[package]
cairo-version = "=2.6.4"
edition = "2023_11"
description = "The Dojo Core library for autonomous worlds."
name = "dojo"
version = "0.7.3"
Expand Down
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 de1a1de

Please sign in to comment.