diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e35cef6d..b7c5a11a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: pull_request: env: - DOJO_VERSION: v1.0.0-alpha.3 + DOJO_VERSION: v1.0.0-alpha.4 SCARB_VERSION: 2.7.0-rc.4 jobs: diff --git a/Scarb.lock b/Scarb.lock index a799b00b..ab75e714 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -9,7 +9,7 @@ source = "git+https://github.com/dojoengine/cubit?branch=cairo_2.7#53020b6320a10 [[package]] name = "dojo" version = "0.7.3" -source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.3#a6a7724380169372336e886fb36f31f56e7d0d8a" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.4#d08c46191fc1b4c4f90816cef4787cb8db02988f" dependencies = [ "dojo_plugin", ] @@ -21,44 +21,44 @@ source = "git+https://github.com/dojoengine/dojo?rev=71b1f1a4#71b1f1a467534cbeeb [[package]] name = "origami_algebra" -version = "0.1.0" +version = "1.0.0-alpha.4" dependencies = [ "cubit", ] [[package]] name = "origami_defi" -version = "0.1.0" +version = "1.0.0-alpha.4" dependencies = [ "cubit", ] [[package]] name = "origami_governance" -version = "1.0.0-alpha.0" +version = "1.0.0-alpha.4" dependencies = [ "dojo", ] [[package]] name = "origami_map" -version = "0.1.0" +version = "1.0.0-alpha.4" [[package]] name = "origami_random" -version = "0.1.0" +version = "1.0.0-alpha.4" [[package]] name = "origami_rating" -version = "0.1.0" +version = "1.0.0-alpha.4" [[package]] name = "origami_security" -version = "0.1.0" +version = "1.0.0-alpha.4" [[package]] name = "origami_token" -version = "1.0.0-alpha.0" +version = "1.0.0-alpha.4" dependencies = [ "dojo", ] diff --git a/Scarb.toml b/Scarb.toml index 56887957..262f3c96 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -7,12 +7,15 @@ members = [ "crates/rating", "crates/security", "crates/token", - "crates/governance" + "crates/governance", ] +[workspace.package] +version = "1.0.0-alpha.4" + [workspace.dependencies] cubit = { git = "https://github.com/dojoengine/cubit", branch = "cairo_2.7" } -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.3" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.4" } starknet = "2.7.0-rc.3" # Scripts are not supported for virtual workspaces. diff --git a/crates/algebra/Scarb.toml b/crates/algebra/Scarb.toml index c8318e85..96fad9d7 100644 --- a/crates/algebra/Scarb.toml +++ b/crates/algebra/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_algebra" -version = "0.1.0" +version.workspace = true description = "Algebra library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/algebra" diff --git a/crates/defi/Scarb.toml b/crates/defi/Scarb.toml index 264f69c4..d08b5e3a 100644 --- a/crates/defi/Scarb.toml +++ b/crates/defi/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_defi" -version = "0.1.0" +version.workspace = true description = "DeFi library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/defi" edition = "2024_07" diff --git a/crates/governance/Scarb.toml b/crates/governance/Scarb.toml index 110c726f..571ab96b 100644 --- a/crates/governance/Scarb.toml +++ b/crates/governance/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_governance" -version = "1.0.0-alpha.0" +version.workspace = true description = "Implementations of Compound Governance standards for the Dojo framework." homepage = "https://github.com/dojoengine/origami/tree/governance" diff --git a/crates/map/Scarb.toml b/crates/map/Scarb.toml index 2881b641..fcf770fe 100644 --- a/crates/map/Scarb.toml +++ b/crates/map/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_map" -version = "0.1.0" +version.workspace = true description = "Maps library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/map" edition = "2024_07" diff --git a/crates/random/Scarb.toml b/crates/random/Scarb.toml index a36e319b..27519626 100644 --- a/crates/random/Scarb.toml +++ b/crates/random/Scarb.toml @@ -1,9 +1,8 @@ [package] name = "origami_random" -version = "0.1.0" +version.workspace = true description = "Random generator library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/random" edition = "2024_07" [dependencies] - diff --git a/crates/rating/Scarb.toml b/crates/rating/Scarb.toml index cbd18267..57b00a35 100644 --- a/crates/rating/Scarb.toml +++ b/crates/rating/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_rating" -version = "0.1.0" +version.workspace = true description = "Rating related algorithm library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/rating" edition = "2024_07" diff --git a/crates/security/Scarb.toml b/crates/security/Scarb.toml index f55b5715..a2284568 100644 --- a/crates/security/Scarb.toml +++ b/crates/security/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_security" -version = "0.1.0" +version.workspace = true description = "Security library for Dojo based games." homepage = "https://github.com/dojoengine/origami/tree/main/crates/security" edition = "2024_07" diff --git a/crates/token/Scarb.toml b/crates/token/Scarb.toml index 41d33b6b..a4c91e6b 100644 --- a/crates/token/Scarb.toml +++ b/crates/token/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "origami_token" -version = "1.0.0-alpha.0" +version.workspace = true description = "Implementations of ERC standards for the Dojo framework." homepage = "https://github.com/dojoengine/origami/tree/crates/token" diff --git a/crates/token/src/components/tests/mocks/erc20/erc20_bridgeable_mock.cairo b/crates/token/src/components/tests/mocks/erc20/erc20_bridgeable_mock.cairo index 6714f727..42151f10 100644 --- a/crates/token/src/components/tests/mocks/erc20/erc20_bridgeable_mock.cairo +++ b/crates/token/src/components/tests/mocks/erc20/erc20_bridgeable_mock.cairo @@ -115,7 +115,7 @@ mod erc20_bridgeable_mock { l2_bridge_address: ContractAddress, ) { assert( - self.world().is_owner(get_caller_address(), self.selector()), + self.world().is_owner(self.selector(), get_caller_address()), Errors::CALLER_IS_NOT_OWNER ); diff --git a/crates/token/src/components/tests/token/erc20/test_erc20_bridgeable.cairo b/crates/token/src/components/tests/token/erc20/test_erc20_bridgeable.cairo index 0ddadb8b..18046267 100644 --- a/crates/token/src/components/tests/token/erc20/test_erc20_bridgeable.cairo +++ b/crates/token/src/components/tests/token/erc20/test_erc20_bridgeable.cairo @@ -66,7 +66,7 @@ fn STATE() -> (IWorldDispatcher, erc20_bridgeable_mock::ContractState) { state.world_dispatcher.write(world); world - .grant_owner(starknet::get_contract_address(), dojo::contract::IContract::selector(@state)); + .grant_owner(dojo::contract::IContract::selector(@state), starknet::get_contract_address()); (world, state) } diff --git a/crates/token/src/presets/erc20/bridgeable.cairo b/crates/token/src/presets/erc20/bridgeable.cairo index 3e476753..dd781012 100644 --- a/crates/token/src/presets/erc20/bridgeable.cairo +++ b/crates/token/src/presets/erc20/bridgeable.cairo @@ -200,7 +200,7 @@ mod ERC20Bridgeable { l2_bridge_address: ContractAddress, ) { assert( - self.world().is_owner(get_caller_address(), self.selector()), + self.world().is_owner(self.selector(), get_caller_address()), Errors::CALLER_IS_NOT_OWNER ); diff --git a/crates/token/src/presets/erc20/tests_bridgeable.cairo b/crates/token/src/presets/erc20/tests_bridgeable.cairo index d71f88a1..3863dd9c 100644 --- a/crates/token/src/presets/erc20/tests_bridgeable.cairo +++ b/crates/token/src/presets/erc20/tests_bridgeable.cairo @@ -83,11 +83,11 @@ fn setup() -> (IWorldDispatcher, IERC20BridgeablePresetDispatcher) { world .grant_owner( - starknet::get_contract_address(), dojo::utils::bytearray_hash(@"origami_token") + dojo::utils::bytearray_hash(@"origami_token"), starknet::get_contract_address() ); - world.grant_owner(OWNER(), dojo::utils::bytearray_hash(@"origami_token")); - world.grant_owner(BRIDGE(), dojo::utils::bytearray_hash(@"origami_token")); - world.grant_owner(SPENDER(), dojo::utils::bytearray_hash(@"origami_token")); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), OWNER()); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), BRIDGE()); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), SPENDER()); // initialize contracts erc20_bridgeable_dispatcher.initializer("NAME", "SYMBOL", SUPPLY, OWNER(), BRIDGE()); diff --git a/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo b/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo index dd84c876..69fa41d6 100644 --- a/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo @@ -204,7 +204,7 @@ mod ERC721EnumMintBurn { token_ids: Span ) { assert( - self.world().is_owner(get_caller_address(), self.selector()), + self.world().is_owner(self.selector(), get_caller_address()), Errors::CALLER_IS_NOT_OWNER ); diff --git a/crates/token/src/presets/erc721/mintable_burnable.cairo b/crates/token/src/presets/erc721/mintable_burnable.cairo index 4185c68a..99833648 100644 --- a/crates/token/src/presets/erc721/mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/mintable_burnable.cairo @@ -170,7 +170,7 @@ mod ERC721MintableBurnable { token_ids: Span ) { assert( - self.world().is_owner(get_caller_address(), self.selector()), + self.world().is_owner(self.selector(), get_caller_address()), Errors::CALLER_IS_NOT_OWNER ); diff --git a/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo b/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo index 735b0ecc..97277e79 100644 --- a/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo @@ -86,10 +86,10 @@ fn setup_uninitialized() -> (IWorldDispatcher, IERC721EnumMintBurnPresetDispatch world .grant_owner( - starknet::get_contract_address(), dojo::utils::bytearray_hash(@"origami_token") + dojo::utils::bytearray_hash(@"origami_token"), starknet::get_contract_address() ); - world.grant_owner(OWNER(), dojo::utils::bytearray_hash(@"origami_token")); - world.grant_owner(SPENDER(), dojo::utils::bytearray_hash(@"origami_token")); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), OWNER()); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), SPENDER()); (world, erc721_enum_mint_burn_dispatcher) } diff --git a/crates/token/src/presets/erc721/tests_mintable_burnable.cairo b/crates/token/src/presets/erc721/tests_mintable_burnable.cairo index 9dc2c2f8..8d262f9b 100644 --- a/crates/token/src/presets/erc721/tests_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/tests_mintable_burnable.cairo @@ -89,10 +89,10 @@ fn setup_uninitialized() -> (IWorldDispatcher, IERC721MintableBurnablePresetDisp world .grant_owner( - starknet::get_contract_address(), dojo::utils::bytearray_hash(@"origami_token") + dojo::utils::bytearray_hash(@"origami_token"), starknet::get_contract_address() ); - world.grant_owner(OWNER(), dojo::utils::bytearray_hash(@"origami_token")); - world.grant_owner(SPENDER(), dojo::utils::bytearray_hash(@"origami_token")); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), OWNER()); + world.grant_owner(dojo::utils::bytearray_hash(@"origami_token"), SPENDER()); (world, erc721_mintable_burnable_dispatcher) }