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

move to edition 2023_11 #2179

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
Loading