diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6627263..4b97250 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.15 + DOJO_VERSION: v1.0.0-alpha.16 SCARB_VERSION: 2.7.0 jobs: diff --git a/Scarb.lock b/Scarb.lock index 29ed5a1..48bd364 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -9,48 +9,48 @@ 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.15#f56c4f90eca84b92f348303dc85ff6e126609f16" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.16#3b3a78cd8239ca2ee524c49c83f36db4d79cb4bc" [[package]] name = "origami_algebra" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" dependencies = [ "cubit", ] [[package]] name = "origami_defi" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" dependencies = [ "cubit", ] [[package]] name = "origami_governance" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" dependencies = [ "dojo", ] [[package]] name = "origami_map" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" [[package]] name = "origami_random" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" [[package]] name = "origami_rating" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" [[package]] name = "origami_security" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" [[package]] name = "origami_token" -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" dependencies = [ "dojo", ] diff --git a/Scarb.toml b/Scarb.toml index dd0f009..0664951 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -11,10 +11,10 @@ members = [ ] [workspace.package] -version = "1.0.0-alpha.15" +version = "1.0.0-alpha.16" [workspace.dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.15" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.16" } # dojo = { path = "../dojo/crates/dojo-core" } cubit = { git = "https://github.com/dojoengine/cubit", branch = "update_to_2.7.0" } starknet = "^2.7.0" diff --git a/crates/token/src/components/tests/token/erc20/test_erc20_metadata.cairo b/crates/token/src/components/tests/token/erc20/test_erc20_metadata.cairo index eda197f..a97abe9 100644 --- a/crates/token/src/components/tests/token/erc20/test_erc20_metadata.cairo +++ b/crates/token/src/components/tests/token/erc20/test_erc20_metadata.cairo @@ -28,7 +28,7 @@ fn test_erc20_metadata_initialize() { state.erc20_metadata.initialize("NAME", "SYMBOL", DECIMALS); - assert(state.erc20_metadata.name() == "NAME", 'Should be NAME'); + assert(state.erc20_metadata.nameXXX() == "NAME", 'Should be NAME'); assert(state.erc20_metadata.symbol() == "SYMBOL", 'Should be SYMBOL'); assert(state.erc20_metadata.decimals() == DECIMALS, 'Should be 18'); assert(state.erc20_metadata.total_supply() == 0, 'Should be 0'); diff --git a/crates/token/src/components/tests/token/erc721/test_erc721_metadata.cairo b/crates/token/src/components/tests/token/erc721/test_erc721_metadata.cairo index 2698f87..43b51c5 100644 --- a/crates/token/src/components/tests/token/erc721/test_erc721_metadata.cairo +++ b/crates/token/src/components/tests/token/erc721/test_erc721_metadata.cairo @@ -45,7 +45,7 @@ fn test_erc721_metadata_initialize() { state.erc721_metadata.initialize(NAME, SYMBOL, URI); - assert(state.erc721_metadata.name() == "NAME", 'Should be NAME'); + assert(state.erc721_metadata.nameXXX() == "NAME", 'Should be NAME'); assert(state.erc721_metadata.symbol() == "SYMBOL", 'Should be SYMBOL'); state.erc721_mintable.mint(OWNER(), 1); diff --git a/crates/token/src/components/token/erc20/erc20_metadata.cairo b/crates/token/src/components/token/erc20/erc20_metadata.cairo index 6b6b960..0cf7d40 100644 --- a/crates/token/src/components/token/erc20/erc20_metadata.cairo +++ b/crates/token/src/components/token/erc20/erc20_metadata.cairo @@ -21,7 +21,7 @@ struct ERC20MetadataModel { #[starknet::interface] trait IERC20Metadata { - fn name(self: @TState) -> ByteArray; + fn nameXXX(self: @TState) -> ByteArray; fn symbol(self: @TState) -> ByteArray; fn decimals(self: @TState) -> u8; } @@ -61,7 +61,7 @@ mod erc20_metadata_component { +IWorldProvider, +Drop, > of IERC20Metadata> { - fn name(self: @ComponentState) -> ByteArray { + fn nameXXX(self: @ComponentState) -> ByteArray { self.get_metadata().name } fn symbol(self: @ComponentState) -> ByteArray { diff --git a/crates/token/src/components/token/erc721/erc721_metadata.cairo b/crates/token/src/components/token/erc721/erc721_metadata.cairo index bb3c7d0..d2065ec 100644 --- a/crates/token/src/components/token/erc721/erc721_metadata.cairo +++ b/crates/token/src/components/token/erc721/erc721_metadata.cairo @@ -20,7 +20,7 @@ struct ERC721MetaModel { #[starknet::interface] trait IERC721Metadata { - fn name(self: @TState) -> ByteArray; + fn nameXXX(self: @TState) -> ByteArray; fn symbol(self: @TState) -> ByteArray; fn token_uri(ref self: TState, token_id: u256) -> ByteArray; } @@ -62,7 +62,7 @@ mod erc721_metadata_component { impl ERC721Owner: erc721_owner_comp::HasComponent, +Drop, > of IERC721Metadata> { - fn name(self: @ComponentState) -> ByteArray { + fn nameXXX(self: @ComponentState) -> ByteArray { self.get_meta().name } fn symbol(self: @ComponentState) -> ByteArray { diff --git a/crates/token/src/components/token/erc721/interface.cairo b/crates/token/src/components/token/erc721/interface.cairo index f0ae3c9..2b0b484 100644 --- a/crates/token/src/components/token/erc721/interface.cairo +++ b/crates/token/src/components/token/erc721/interface.cairo @@ -28,7 +28,7 @@ trait IERC721 { #[starknet::interface] trait IERC721Metadata { - fn name(self: @TState) -> ByteArray; + fn nameXXX(self: @TState) -> ByteArray; fn symbol(self: @TState) -> ByteArray; fn token_uri(self: @TState, token_id: u256) -> ByteArray; } @@ -80,7 +80,7 @@ trait ERC721ABI { ) -> bool; // IERC721Metadata - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn token_uri(self: @TState, token_id: u256) -> felt252; diff --git a/crates/token/src/erc1155/erc1155.cairo b/crates/token/src/erc1155/erc1155.cairo index 972b560..15dff64 100644 --- a/crates/token/src/erc1155/erc1155.cairo +++ b/crates/token/src/erc1155/erc1155.cairo @@ -75,7 +75,7 @@ mod ERC1155 { #[abi(embed_v0)] impl ERC1155MetadataImpl of interface::IERC1155Metadata { - fn name(self: @ContractState) -> felt252 { + fn nameXXX(self: @ContractState) -> felt252 { self.get_meta().name } diff --git a/crates/token/src/erc1155/interface.cairo b/crates/token/src/erc1155/interface.cairo index e29a662..302ad92 100644 --- a/crates/token/src/erc1155/interface.cairo +++ b/crates/token/src/erc1155/interface.cairo @@ -56,7 +56,7 @@ trait IERC1155CamelOnly { #[starknet::interface] trait IERC1155Metadata { - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn uri(self: @TState, token_id: u256) -> felt252; } @@ -94,7 +94,7 @@ trait ERC1155ABI { ); // IERC1155Metadata - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn uri(self: @TState, token_id: u256) -> felt252; diff --git a/crates/token/src/erc1155/tests.cairo b/crates/token/src/erc1155/tests.cairo index 7b8075f..bb5f870 100644 --- a/crates/token/src/erc1155/tests.cairo +++ b/crates/token/src/erc1155/tests.cairo @@ -67,7 +67,7 @@ fn test_constructor() { let (world, mut state) = STATE(); ERC1155::constructor(ref state, world.contract_address, NAME, SYMBOL, URI); - assert(ERC1155MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC1155MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC1155MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC1155MetadataImpl::uri(@state, 0) == URI, 'Uri should be URI'); // assert( @@ -89,7 +89,7 @@ fn test_initializer() { let (_world, mut state) = STATE(); InternalImpl::initializer(ref state, NAME, SYMBOL, URI); - assert(ERC1155MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC1155MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC1155MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC1155Impl::balance_of(@state, OWNER(), 0) == 0, 'Balance should be zero'); diff --git a/crates/token/src/erc20/erc20.cairo b/crates/token/src/erc20/erc20.cairo index 62a8ea8..120de3e 100644 --- a/crates/token/src/erc20/erc20.cairo +++ b/crates/token/src/erc20/erc20.cairo @@ -64,7 +64,7 @@ mod ERC20 { #[abi(embed_v0)] impl ERC20MetadataImpl of interface::IERC20Metadata { - fn name(self: @ContractState) -> felt252 { + fn nameXXX(self: @ContractState) -> felt252 { self.get_meta().name } diff --git a/crates/token/src/erc20/interface.cairo b/crates/token/src/erc20/interface.cairo index 577ce7d..e725ba2 100644 --- a/crates/token/src/erc20/interface.cairo +++ b/crates/token/src/erc20/interface.cairo @@ -14,7 +14,7 @@ trait IERC20 { #[starknet::interface] trait IERC20Metadata { - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn decimals(self: @TState) -> u8; } @@ -53,7 +53,7 @@ trait ERC20ABI { fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; // IERC20Metadata - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn decimals(self: @TState) -> u8; diff --git a/crates/token/src/erc20/tests.cairo b/crates/token/src/erc20/tests.cairo index d0cb4ea..04e606d 100644 --- a/crates/token/src/erc20/tests.cairo +++ b/crates/token/src/erc20/tests.cairo @@ -59,7 +59,7 @@ fn test_initializer() { let (_world, mut state) = STATE(); InternalImpl::initializer(ref state, NAME, SYMBOL); - assert(ERC20MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC20MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC20MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC20MetadataImpl::decimals(@state) == DECIMALS, 'Decimals should be 18'); assert(ERC20Impl::total_supply(@state) == 0, 'Supply should eq 0'); @@ -75,7 +75,7 @@ fn test_constructor() { assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY, 'Should eq inital_supply'); assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Should eq inital_supply'); - assert(ERC20MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC20MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC20MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC20MetadataImpl::decimals(@state) == DECIMALS, 'Decimals should be 18'); } diff --git a/crates/token/src/erc721/erc721.cairo b/crates/token/src/erc721/erc721.cairo index 6a1bc7a..bd9d0bc 100644 --- a/crates/token/src/erc721/erc721.cairo +++ b/crates/token/src/erc721/erc721.cairo @@ -75,7 +75,7 @@ mod ERC721 { #[abi(embed_v0)] impl ERC721MetadataImpl of interface::IERC721Metadata { - fn name(self: @ContractState) -> felt252 { + fn nameXXX(self: @ContractState) -> felt252 { self.get_meta().name } diff --git a/crates/token/src/erc721/interface.cairo b/crates/token/src/erc721/interface.cairo index d257cc9..109baa6 100644 --- a/crates/token/src/erc721/interface.cairo +++ b/crates/token/src/erc721/interface.cairo @@ -28,7 +28,7 @@ trait IERC721 { #[starknet::interface] trait IERC721Metadata { - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn token_uri(self: @TState, token_id: u256) -> felt252; } @@ -80,7 +80,7 @@ trait ERC721ABI { ) -> bool; // IERC721Metadata - fn name(self: @TState) -> felt252; + fn nameXXX(self: @TState) -> felt252; fn symbol(self: @TState) -> felt252; fn token_uri(self: @TState, token_id: u256) -> felt252; diff --git a/crates/token/src/erc721/tests.cairo b/crates/token/src/erc721/tests.cairo index 7d7d960..908f45c 100644 --- a/crates/token/src/erc721/tests.cairo +++ b/crates/token/src/erc721/tests.cairo @@ -92,7 +92,7 @@ fn test_constructor() { let (world, mut state) = STATE(); ERC721::constructor(ref state, world.contract_address, NAME, SYMBOL, URI, OWNER(), TOKEN_ID); - assert(ERC721MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC721MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC721MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance should be one'); assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'OWNER should be owner'); @@ -115,7 +115,7 @@ fn test_initializer() { let (_world, mut state) = STATE(); InternalImpl::initializer(ref state, NAME, SYMBOL, URI); - assert(ERC721MetadataImpl::name(@state) == NAME, 'Name should be NAME'); + assert(ERC721MetadataImpl::nameXXX(@state) == NAME, 'Name should be NAME'); assert(ERC721MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); assert(ERC721Impl::balance_of(@state, OWNER()) == 0, 'Balance should be zero'); diff --git a/crates/token/src/presets/erc20/bridgeable.cairo b/crates/token/src/presets/erc20/bridgeable.cairo index d800065..080587f 100644 --- a/crates/token/src/presets/erc20/bridgeable.cairo +++ b/crates/token/src/presets/erc20/bridgeable.cairo @@ -11,7 +11,7 @@ trait IERC20BridgeablePreset { // IERC20Metadata fn decimals(self: @TState,) -> u8; - fn name(self: @TState,) -> ByteArray; + fn nameXXX(self: @TState,) -> ByteArray; fn symbol(self: @TState,) -> ByteArray; // IERC20MetadataTotalSupply diff --git a/crates/token/src/presets/erc20/tests_bridgeable.cairo b/crates/token/src/presets/erc20/tests_bridgeable.cairo index e5cf346..f5f2016 100644 --- a/crates/token/src/presets/erc20/tests_bridgeable.cairo +++ b/crates/token/src/presets/erc20/tests_bridgeable.cairo @@ -107,7 +107,7 @@ fn test_initializer() { assert(erc20_bridgeable.balance_of(OWNER()) == SUPPLY, 'Should eq inital_supply'); assert(erc20_bridgeable.total_supply() == SUPPLY, 'Should eq inital_supply'); - assert(erc20_bridgeable.name() == "NAME", 'Name should be NAME'); + assert(erc20_bridgeable.nameXXX() == "NAME", 'Name should be NAME'); assert(erc20_bridgeable.symbol() == "SYMBOL", 'Symbol should be SYMBOL'); assert(erc20_bridgeable.decimals() == DECIMALS, 'Decimals should be 18'); assert(erc20_bridgeable.l2_bridge_address() == BRIDGE(), 'Decimals should be BRIDGE'); diff --git a/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo b/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo index 69fa41d..98425cb 100644 --- a/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/enumerable_mintable_burnable.cairo @@ -4,7 +4,7 @@ use dojo::world::IWorldDispatcher; #[starknet::interface] trait IERC721EnumMintBurnPreset { // IERC721 - fn name(self: @TState) -> ByteArray; + fn nameXXX(self: @TState) -> ByteArray; fn symbol(self: @TState) -> ByteArray; fn token_uri(ref self: TState, token_id: u256) -> ByteArray; fn owner_of(self: @TState, account: ContractAddress) -> bool; diff --git a/crates/token/src/presets/erc721/mintable_burnable.cairo b/crates/token/src/presets/erc721/mintable_burnable.cairo index 9983364..90b3fbb 100644 --- a/crates/token/src/presets/erc721/mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/mintable_burnable.cairo @@ -4,7 +4,7 @@ use dojo::world::IWorldDispatcher; #[starknet::interface] trait IERC721MintableBurnablePreset { // IERC721 - fn name(self: @TState) -> ByteArray; + fn nameXXX(self: @TState) -> ByteArray; fn symbol(self: @TState) -> ByteArray; fn token_uri(ref self: TState, token_id: u256) -> ByteArray; fn owner_of(self: @TState, account: ContractAddress) -> bool; 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 0d873ff..81c9878 100644 --- a/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/tests_enumerable_mintable_burnable.cairo @@ -115,7 +115,7 @@ fn test_initializer() { let (_world, mut enum_mint_burn) = setup(); assert(enum_mint_burn.balance_of(OWNER()) == 2, 'Should eq 2'); - assert(enum_mint_burn.name() == "NAME", 'Name should be NAME'); + assert(enum_mint_burn.nameXXX() == "NAME", 'Name should be NAME'); assert(enum_mint_burn.symbol() == "SYMBOL", 'Symbol should be SYMBOL'); assert(enum_mint_burn.token_uri(TOKEN_ID) == "URI21", 'Uri should be URI21'); } diff --git a/crates/token/src/presets/erc721/tests_mintable_burnable.cairo b/crates/token/src/presets/erc721/tests_mintable_burnable.cairo index 689e1c2..1f22300 100644 --- a/crates/token/src/presets/erc721/tests_mintable_burnable.cairo +++ b/crates/token/src/presets/erc721/tests_mintable_burnable.cairo @@ -116,7 +116,7 @@ fn test_initializer() { let (_world, mut mintable_burnable) = setup(); assert(mintable_burnable.balance_of(OWNER()) == 2, 'Should eq 2'); - assert(mintable_burnable.name() == "NAME", 'Name should be NAME'); + assert(mintable_burnable.nameXXX() == "NAME", 'Name should be NAME'); assert(mintable_burnable.symbol() == "SYMBOL", 'Symbol should be SYMBOL'); assert(mintable_burnable.token_uri(TOKEN_ID) == "URI21", 'Uri should be URI21'); }