Skip to content

Commit

Permalink
chore: redeploy contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Adegbite Ademola Kelvin authored and Adegbite Ademola Kelvin committed Dec 17, 2024
1 parent aaa3d17 commit 5f97b47
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
15 changes: 8 additions & 7 deletions addresses.txt
Original file line number Diff line number Diff line change
@@ -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 |
20 changes: 10 additions & 10 deletions src/hub/hub.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -57,8 +57,8 @@ pub mod ColonizHub {

#[abi(embed_v0)]
impl ProfileImpl = ProfileComponent::colonizProfile<ContractState>;
#[abi(embed_v0)]
impl PublicationImpl = PublicationComponent::colonizPublication<ContractState>;
// #[abi(embed_v0)]
// impl PublicationImpl = PublicationComponent::colonizPublication<ContractState>;
#[abi(embed_v0)]
impl communityImpl = CommunityComponent::colonizCommunity<ContractState>;
#[abi(embed_v0)]
Expand All @@ -70,7 +70,7 @@ pub mod ColonizHub {

impl OwnableInternalImpl = OwnableComponent::InternalImpl<ContractState>;
impl joltPrivateImpl = JoltComponent::Private<ContractState>;
impl PublicationPrivateImpl = PublicationComponent::InternalImpl<ContractState>;
// impl PublicationPrivateImpl = PublicationComponent::InternalImpl<ContractState>;
impl ProfilePrivateImpl = ProfileComponent::Private<ContractState>;
impl channelPrivateImpl = ChannelComponent::InternalImpl<ContractState>;
impl communityPrivateImpl = CommunityComponent::Private<ContractState>;
Expand All @@ -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)]
Expand All @@ -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]
Expand All @@ -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
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests/test_hub.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 5f97b47

Please sign in to comment.