From 175dc4ab54a3e9fc6d1341850dedb33002f260a0 Mon Sep 17 00:00:00 2001 From: glihm Date: Thu, 26 Sep 2024 19:08:10 -0500 Subject: [PATCH] fix: use name for contract interface to be consistent --- crates/dojo-core/src/contract/contract.cairo | 3 +-- crates/dojo-lang/src/contract.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/dojo-core/src/contract/contract.cairo b/crates/dojo-core/src/contract/contract.cairo index 1c0c7130c8..462d02d54b 100644 --- a/crates/dojo-core/src/contract/contract.cairo +++ b/crates/dojo-core/src/contract/contract.cairo @@ -1,9 +1,8 @@ #[starknet::interface] pub trait IContract { - 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; diff --git a/crates/dojo-lang/src/contract.rs b/crates/dojo-lang/src/contract.rs index 23810b113b..1617d34ddf 100644 --- a/crates/dojo-lang/src/contract.rs +++ b/crates/dojo-lang/src/contract.rs @@ -185,7 +185,7 @@ impl DojoContract { #[abi(embed_v0)] pub impl ContractImpl of IContract { - fn contract_name(self: @ContractState) -> ByteArray { + fn name(self: @ContractState) -> ByteArray { \"$name$\" }