Skip to content

Commit

Permalink
fix: use name for contract interface to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Sep 27, 2024
1 parent 881e1aa commit 175dc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions crates/dojo-core/src/contract/contract.cairo
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#[starknet::interface]
pub trait IContract<T> {
fn contract_name(self: @T) -> ByteArray;
fn name(self: @T) -> ByteArray;
fn namespace(self: @T) -> ByteArray;
fn tag(self: @T) -> ByteArray;

fn name_hash(self: @T) -> felt252;
fn namespace_hash(self: @T) -> felt252;
fn selector(self: @T) -> felt252;
Expand Down
2 changes: 1 addition & 1 deletion crates/dojo-lang/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl DojoContract {
#[abi(embed_v0)]
pub impl ContractImpl of IContract<ContractState> {
fn contract_name(self: @ContractState) -> ByteArray {
fn name(self: @ContractState) -> ByteArray {
\"$name$\"
}
Expand Down

0 comments on commit 175dc4a

Please sign in to comment.