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

v1.0.0-alpha.6 #88

Merged
merged 1 commit into from
Aug 16, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

env:
DOJO_VERSION: v1.0.0-alpha.5
DOJO_VERSION: v1.0.0-alpha.6
SCARB_VERSION: 2.7.0

jobs:
Expand Down
18 changes: 9 additions & 9 deletions Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source = "git+https://github.com/dojoengine/cubit?branch=update_to_2.7.0#075bf5a
[[package]]
name = "dojo"
version = "1.0.0-alpha.4"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.5#6878242e120d3135d3bc1bb94135d7135693069b"
source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.6#ede7930735c708572af8a87f81bb76354a401b3a"
dependencies = [
"dojo_plugin",
]
Expand All @@ -21,44 +21,44 @@ source = "git+https://github.com/dojoengine/dojo?rev=f15def33#f15def330c0d099e79

[[package]]
name = "origami_algebra"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"
dependencies = [
"cubit",
]

[[package]]
name = "origami_defi"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"
dependencies = [
"cubit",
]

[[package]]
name = "origami_governance"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"
dependencies = [
"dojo",
]

[[package]]
name = "origami_map"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"

[[package]]
name = "origami_random"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"

[[package]]
name = "origami_rating"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"

[[package]]
name = "origami_security"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"

[[package]]
name = "origami_token"
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"
dependencies = [
"dojo",
]
4 changes: 2 additions & 2 deletions Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ members = [
]

[workspace.package]
version = "1.0.0-alpha.5"
version = "1.0.0-alpha.6"

[workspace.dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.5" }
dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.6" }
# dojo = { path = "../dojo/crates/dojo-core" }
cubit = { git = "https://github.com/dojoengine/cubit", branch = "update_to_2.7.0" }
starknet = "^2.7.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/governance/src/utils/testing.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fn setup() -> (Systems, IWorldDispatcher) {
nonces::TEST_CLASS_HASH,
mock_balances::TEST_CLASS_HASH,
];
let world = spawn_test_world("origami_governance", models);
let world = spawn_test_world(["origami_governance"].span(), models.span());

let contract_address = world.deploy_contract(1, governor::TEST_CLASS_HASH.try_into().unwrap());
let governor = IGovernorDispatcher { contract_address };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use origami_token::tests::constants::{OTHER_ID};


fn STATE() -> (IWorldDispatcher, SRC5Mock::ContractState) {
let world = spawn_test_world("origami_token", array![src_5_model::TEST_CLASS_HASH,]);
let world = spawn_test_world(["origami_token"].span(), [src_5_model::TEST_CLASS_HASH,].span());
let mut state = SRC5Mock::contract_state_for_testing();
state.world_dispatcher.write(world);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ use origami_token::components::security::initializable::initializable_component:
use origami_token::components::tests::mocks::initializable_mock::InitializableMock;

fn STATE() -> (IWorldDispatcher, InitializableMock::ContractState) {
let world = spawn_test_world("origami_token", array![initializable_model::TEST_CLASS_HASH,]);
let world = spawn_test_world(
["origami_token"].span(), [initializable_model::TEST_CLASS_HASH,].span()
);

let mut state = InitializableMock::contract_state_for_testing();
state.world_dispatcher.write(world);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ fn assert_only_event_approval(
//

fn STATE() -> (IWorldDispatcher, erc20_allowance_mock::ContractState) {
let world = spawn_test_world("origami_token", array![erc_20_allowance_model::TEST_CLASS_HASH,]);
let world = spawn_test_world(
["origami_token"].span(), [erc_20_allowance_model::TEST_CLASS_HASH,].span()
);

let mut state = erc20_allowance_mock::contract_state_for_testing();
state.world_dispatcher.write(world);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ fn assert_only_event_transfer(

fn STATE() -> (IWorldDispatcher, erc20_balance_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![erc_20_balance_model::TEST_CLASS_HASH, erc_20_allowance_model::TEST_CLASS_HASH,]
["origami_token"].span(),
[erc_20_balance_model::TEST_CLASS_HASH, erc_20_allowance_model::TEST_CLASS_HASH,].span()
);

let mut state = erc20_balance_mock::contract_state_for_testing();
Expand Down Expand Up @@ -157,8 +157,8 @@ fn test_erc20_balance_transfer_internal_to_zero() {

fn setup() -> (IWorldDispatcher, IERC20BalanceMockDispatcher) {
let world = spawn_test_world(
"origami_token",
array![erc_20_allowance_model::TEST_CLASS_HASH, erc_20_balance_model::TEST_CLASS_HASH,]
["origami_token"].span(),
[erc_20_allowance_model::TEST_CLASS_HASH, erc_20_balance_model::TEST_CLASS_HASH,].span()
);

// deploy contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ use origami_token::components::security::initializable::initializable_model;

fn STATE() -> (IWorldDispatcher, erc20_bridgeable_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_20_metadata_model::TEST_CLASS_HASH,
erc_20_balance_model::TEST_CLASS_HASH,
erc_20_bridgeable_model::TEST_CLASS_HASH,
erc_20_allowance_model::TEST_CLASS_HASH,
initializable_model::TEST_CLASS_HASH,
]
].span()
);

// Deploy the contract to ensure the selector is a known resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ use origami_token::components::token::erc20::erc20_metadata::erc20_metadata_comp
use origami_token::components::tests::mocks::erc20::erc20_metadata_mock::erc20_metadata_mock;

fn STATE() -> (IWorldDispatcher, erc20_metadata_mock::ContractState) {
let world = spawn_test_world("origami_token", array![erc_20_metadata_model::TEST_CLASS_HASH,]);
let world = spawn_test_world(
["origami_token"].span(), [erc_20_metadata_model::TEST_CLASS_HASH,].span()
);

let mut state = erc20_metadata_mock::contract_state_for_testing();
state.world_dispatcher.write(world);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use origami_token::components::tests::mocks::erc20::erc20_mintable_burnable_mock

fn STATE() -> (IWorldDispatcher, erc20_mintable_burnable_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![erc_20_metadata_model::TEST_CLASS_HASH, erc_20_balance_model::TEST_CLASS_HASH,]
["origami_token"].span(),
[erc_20_metadata_model::TEST_CLASS_HASH, erc_20_balance_model::TEST_CLASS_HASH,].span()
);

let mut state = erc20_mintable_burnable_mock::contract_state_for_testing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ fn assert_only_event_approval_for_all(

fn STATE() -> (IWorldDispatcher, erc721_approval_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_token_approval_model::TEST_CLASS_HASH,
erc_721_operator_approval_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH
]
].span()
);

let mut state = erc721_approval_mock::contract_state_for_testing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ fn assert_only_event_transfer(

fn STATE() -> (IWorldDispatcher, erc721_balance_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_token_approval_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
]
].span()
);

let mut state = erc721_balance_mock::contract_state_for_testing();
Expand Down Expand Up @@ -173,13 +173,13 @@ fn test_erc721_balance_unauthorized() {

fn setup() -> (IWorldDispatcher, IERC721BalanceMockDispatcher, IERC721ReceiverMockDispatcher) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_token_approval_model::TEST_CLASS_HASH,
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
src_5_model::TEST_CLASS_HASH,
]
].span()
);

// deploy balance mock contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ use debug::PrintTrait;

fn STATE() -> (IWorldDispatcher, erc721_enumerable_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_enumerable_index_model::TEST_CLASS_HASH,
erc_721_enumerable_owner_index_model::TEST_CLASS_HASH,
erc_721_enumerable_total_model::TEST_CLASS_HASH,
Expand All @@ -50,7 +50,7 @@ fn STATE() -> (IWorldDispatcher, erc721_enumerable_mock::ContractState) {
erc_721_owner_model::TEST_CLASS_HASH,
erc_721_enumerable_token_model::TEST_CLASS_HASH,
erc_721_token_approval_model::TEST_CLASS_HASH,
]
].span()
);

let mut state = erc721_enumerable_mock::contract_state_for_testing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ use origami_token::components::tests::mocks::erc721::erc721_metadata_mock::erc72

fn STATE() -> (IWorldDispatcher, erc721_metadata_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_meta_model::TEST_CLASS_HASH,
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
]
].span()
);

let mut state = erc721_metadata_mock::contract_state_for_testing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ use origami_token::components::tests::mocks::erc721::erc721_mintable_burnable_mo

fn STATE() -> (IWorldDispatcher, erc721_mintable_burnable_mock::ContractState) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_meta_model::TEST_CLASS_HASH,
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
erc_721_token_approval_model::TEST_CLASS_HASH,
]
].span()
);

let mut state = erc721_mintable_burnable_mock::contract_state_for_testing();
Expand Down
5 changes: 3 additions & 2 deletions crates/token/src/erc1155/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ use debug::PrintTrait;

fn STATE() -> (IWorldDispatcher, ERC1155::ContractState) {
let world = spawn_test_world(
array![
[].span(),
[
erc_1155_meta::TEST_CLASS_HASH,
erc_1155_operator_approval::TEST_CLASS_HASH,
erc_1155_balance::TEST_CLASS_HASH,
]
].span()
);
let mut state = ERC1155::contract_state_for_testing();
state._world.write(world.contract_address);
Expand Down
3 changes: 2 additions & 1 deletion crates/token/src/erc20/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ use debug::PrintTrait;

fn STATE() -> (IWorldDispatcher, ERC20::ContractState) {
let world = spawn_test_world(
array![
[].span(),
[
erc_20_allowance::TEST_CLASS_HASH,
erc_20_balance::TEST_CLASS_HASH,
erc_20_meta::TEST_CLASS_HASH,
Expand Down
5 changes: 3 additions & 2 deletions crates/token/src/erc721/tests.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ use starknet::storage::{StorageMemberAccessTrait};

fn STATE() -> (IWorldDispatcher, ERC721::ContractState) {
let world = spawn_test_world(
array![
[].span(),
[
erc_721_meta::TEST_CLASS_HASH,
erc_721_operator_approval::TEST_CLASS_HASH,
erc_721_owner::TEST_CLASS_HASH,
erc_721_balance::TEST_CLASS_HASH,
erc_721_token_approval::TEST_CLASS_HASH,
]
].span()
);
let mut state = ERC721::contract_state_for_testing();
state._world.write(world.contract_address);
Expand Down
6 changes: 3 additions & 3 deletions crates/token/src/presets/erc20/tests_bridgeable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ use origami_token::components::security::initializable::initializable_model;

fn setup() -> (IWorldDispatcher, IERC20BridgeablePresetDispatcher) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_20_allowance_model::TEST_CLASS_HASH,
erc_20_balance_model::TEST_CLASS_HASH,
erc_20_metadata_model::TEST_CLASS_HASH,
erc_20_bridgeable_model::TEST_CLASS_HASH,
initializable_model::TEST_CLASS_HASH,
]
].span()
);

// deploy contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ use origami_token::components::security::initializable::initializable_model;

fn setup_uninitialized() -> (IWorldDispatcher, IERC721EnumMintBurnPresetDispatcher) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_token_approval_model::TEST_CLASS_HASH,
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_meta_model::TEST_CLASS_HASH,
Expand All @@ -73,7 +73,7 @@ fn setup_uninitialized() -> (IWorldDispatcher, IERC721EnumMintBurnPresetDispatch
erc_721_enumerable_total_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
initializable_model::TEST_CLASS_HASH,
]
].span()
);

// deploy contract
Expand Down
6 changes: 3 additions & 3 deletions crates/token/src/presets/erc721/tests_mintable_burnable.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ use origami_token::components::token::erc721::erc721_owner::erc_721_owner_model;

fn setup_uninitialized() -> (IWorldDispatcher, IERC721MintableBurnablePresetDispatcher) {
let world = spawn_test_world(
"origami_token",
array![
["origami_token"].span(),
[
erc_721_token_approval_model::TEST_CLASS_HASH,
erc_721_balance_model::TEST_CLASS_HASH,
erc_721_meta_model::TEST_CLASS_HASH,
Expand All @@ -76,7 +76,7 @@ fn setup_uninitialized() -> (IWorldDispatcher, IERC721MintableBurnablePresetDisp
erc_721_enumerable_total_model::TEST_CLASS_HASH,
erc_721_owner_model::TEST_CLASS_HASH,
initializable_model::TEST_CLASS_HASH,
]
].span()
);

// deploy contract
Expand Down
Loading