From 5f97b476b15c944b647916a17288abb0ede7b242 Mon Sep 17 00:00:00 2001 From: Adegbite Ademola Kelvin Date: Tue, 17 Dec 2024 23:52:00 +0100 Subject: [PATCH] chore: redeploy contracts --- addresses.txt | 15 ++++++++------- src/hub/hub.cairo | 20 ++++++++++---------- tests/test_hub.cairo | 4 ++-- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/addresses.txt b/addresses.txt index 06b270b..e387632 100644 --- a/addresses.txt +++ b/addresses.txt @@ -1,9 +1,10 @@ SEPOLIA ADDRESSES: -Hub Address - 0x00fde7695a162a807214e78cd1f3a09c21fc0b7a07aeeb875049dcfaaa1a07a2 -Coloniz NFT - 0x01d3ec880419c6714800fc406d0696dde969f51c0521ca0b5c76b1f69af3eb46 -Handles - 0x752dd216dcebb660204c7302ff0a99494e7f8c464cb4fe48112d39e12f3df14 -Handles Registry - 0x4b5eef8900d4329f8fe60d3d79a6ef8ac79c2d979fce15da18f53ab25e79e83 -Follow NFT (classhash) - 0x05dffad824556defac917572ffe4644a3b652662779bafd346888d09306dfe0d -Community NFT (classhash) - 0x050bea932528781b2da6f85e376df259cee7053f71528e0dbe617b13bae79a21 -Admin - 0x02F659cf8CCE41168B8c0A8BedCE468E33BE1B7bd26E920266C025Dc0F8FBD1b +| Contract | ClassHash | Contract Address | +|--------------------|---------------------------------------------------------------------------|------------------------------------------------------------------- | +| Follow NFT | 0x0371d73a9bfb174a666676065c070dad5e039497e94ae15a8f6d6b3598974770 | - | +| Community NFT | 0x03081ad7d528fbf2b3bb3954e688fc7339dda70d79029f44005294450a1f5e9b | - | +| Handles | 0x04c627aded2129f87a55e43ed2efb7fc5d9d824fd3dafe8907833e24d104822f | 0x02d365a9e93fb1a87e5b5f8b69091d71b222b1a20873fb40ce956846f4b7048b | +| Handles Registry | 0x06d672a615f4035563f989eb423d563d011ea9c4f932ba0c8fe85f5811567834 | 0x0122223d4da13bd2854b606079cf6016c7e4b20d67236fd740ab1713c43e8919 | +| Coloniz NFT | 0x00ece545a7650d6233077a8cce0d6388c0800c907c7b3dd598369127ff21fc26 | 0x036053a7520d7ff5cb1ce8ebec7acaf8b6364130865662937ab1e2a36d4e00c1 | +| Hub | 0x00134fe5f890dfa427b1975f26f15620b8194f0b64b2beb2bbf5b868b95941d2 | 0x04bd89ef797c5a34a3c8bcc9dafca270959d9edcd568ea22a2364ffb3af959f0 | diff --git a/src/hub/hub.cairo b/src/hub/hub.cairo index 2ff8d35..dfbcc0f 100644 --- a/src/hub/hub.cairo +++ b/src/hub/hub.cairo @@ -28,7 +28,7 @@ pub mod ColonizHub { storage::{StoragePointerWriteAccess, StoragePointerReadAccess} }; use coloniz::profile::profile::ProfileComponent; - use coloniz::publication::publication::PublicationComponent; + // use coloniz::publication::publication::PublicationComponent; use coloniz::community::community::CommunityComponent; use coloniz::channel::channel::ChannelComponent; use coloniz::jolt::jolt::JoltComponent; @@ -48,7 +48,7 @@ pub mod ColonizHub { // COMPONENTS // ************************************************************************* component!(path: ProfileComponent, storage: profile, event: ProfileEvent); - component!(path: PublicationComponent, storage: publication, event: PublicationEvent); + // component!(path: PublicationComponent, storage: publication, event: PublicationEvent); component!(path: OwnableComponent, storage: ownable, event: OwnableEvent); component!(path: JoltComponent, storage: jolt, event: JoltEvent); component!(path: ChannelComponent, storage: channel, event: ChannelEvent); @@ -57,8 +57,8 @@ pub mod ColonizHub { #[abi(embed_v0)] impl ProfileImpl = ProfileComponent::colonizProfile; - #[abi(embed_v0)] - impl PublicationImpl = PublicationComponent::colonizPublication; + // #[abi(embed_v0)] + // impl PublicationImpl = PublicationComponent::colonizPublication; #[abi(embed_v0)] impl communityImpl = CommunityComponent::colonizCommunity; #[abi(embed_v0)] @@ -70,7 +70,7 @@ pub mod ColonizHub { impl OwnableInternalImpl = OwnableComponent::InternalImpl; impl joltPrivateImpl = JoltComponent::Private; - impl PublicationPrivateImpl = PublicationComponent::InternalImpl; + // impl PublicationPrivateImpl = PublicationComponent::InternalImpl; impl ProfilePrivateImpl = ProfileComponent::Private; impl channelPrivateImpl = ChannelComponent::InternalImpl; impl communityPrivateImpl = CommunityComponent::Private; @@ -83,8 +83,8 @@ pub mod ColonizHub { struct Storage { #[substorage(v0)] profile: ProfileComponent::Storage, - #[substorage(v0)] - publication: PublicationComponent::Storage, + // #[substorage(v0)] + // publication: PublicationComponent::Storage, #[substorage(v0)] jolt: JoltComponent::Storage, #[substorage(v0)] @@ -106,7 +106,7 @@ pub mod ColonizHub { #[derive(Drop, starknet::Event)] enum Event { ProfileEvent: ProfileComponent::Event, - PublicationEvent: PublicationComponent::Event, + // PublicationEvent: PublicationComponent::Event, #[flat] JoltEvent: JoltComponent::Event, #[flat] @@ -130,7 +130,7 @@ pub mod ColonizHub { handle_registry_contract_address: ContractAddress, follow_nft_classhash: felt252, community_nft_classhash: felt252, - collect_nft_classhash: felt252, + // collect_nft_classhash: felt252, owner: ContractAddress ) { self @@ -141,7 +141,7 @@ pub mod ColonizHub { self.handle_contract_address.write(handle_contract_address); self.handle_registry_contract_address.write(handle_registry_contract_address); self.channel._initializer(); - self.publication._initializer(collect_nft_classhash); + // self.publication._initializer(collect_nft_classhash); self.community._initializer(community_nft_classhash); self.jolt._initializer(owner); self.ownable.initializer(owner); diff --git a/tests/test_hub.cairo b/tests/test_hub.cairo index d673cba..69fe58a 100644 --- a/tests/test_hub.cairo +++ b/tests/test_hub.cairo @@ -63,7 +63,7 @@ fn __setup__() -> (ContractAddress, ContractAddress, ContractAddress, ContractAd let community_nft_classhash = declare("CommunityNFT").unwrap().contract_class(); // declare collectnft - let collect_nft_classhash = declare("CollectNFT").unwrap().contract_class(); + // let collect_nft_classhash = declare("CollectNFT").unwrap().contract_class(); // deploy hub contract let hub_class_hash = declare("ColonizHub").unwrap().contract_class(); @@ -73,7 +73,7 @@ fn __setup__() -> (ContractAddress, ContractAddress, ContractAddress, ContractAd handle_registry_contract_address.into(), (*follow_nft_classhash.class_hash).into(), (*community_nft_classhash.class_hash).into(), - (*collect_nft_classhash.class_hash).into(), + // (*collect_nft_classhash.class_hash).into(), OWNER ]; let (hub_contract_address, _) = hub_class_hash.deploy(@calldata).unwrap_syscall();