diff --git a/Readme.md b/Readme.md index dae1725..16375f7 100644 --- a/Readme.md +++ b/Readme.md @@ -68,3 +68,14 @@ If you believe you have found a security vulnerability in our code, please repor ## License KARST is an open-source software licensed under the [MIT](https://github.com/horuslabsio/karst-core/blob/master/LICENSE.md). + +## Contributors + + + + + + + + + \ No newline at end of file diff --git a/src/interfaces/IPublication.cairo b/src/interfaces/IPublication.cairo index c7becae..2bde350 100644 --- a/src/interfaces/IPublication.cairo +++ b/src/interfaces/IPublication.cairo @@ -3,7 +3,7 @@ // ************************************************************************* use starknet::ContractAddress; use karst::base::types::{ - PostParams, MirrorParams, ReferencePubParams, PublicationType, Publication + PostParams, MirrorParams, ReferencePubParams, PublicationType, Publication, QuoteParams }; #[starknet::interface] @@ -28,7 +28,7 @@ pub trait IKarstPublications { fn mirror( ref self: T, mirrorParams: MirrorParams, profile_contract_address: ContractAddress ) -> u256; - + fn quote(ref self: T, quoteParams: QuoteParams) -> u256; // ************************************************************************* // GETTERS // ************************************************************************* diff --git a/src/publication/publication.cairo b/src/publication/publication.cairo index 55aad92..ed0fae5 100644 --- a/src/publication/publication.cairo +++ b/src/publication/publication.cairo @@ -9,42 +9,6 @@ use karst::base::types::{ use karst::interfaces::IProfile::{IKarstProfileDispatcher, IKarstProfileDispatcherTrait}; use core::option::OptionTrait; -// ************************************************************************* -// INTERFACE of KARST PUBLICATIONS -// ************************************************************************* -#[starknet::interface] -pub trait IKarstPublications { - // ************************************************************************* - // PUBLISHING FUNCTIONS - // ************************************************************************* - - fn post( - ref self: T, - contentURI: ByteArray, - profile_address: ContractAddress, - profile_contract_address: ContractAddress - ) -> u256; - fn comment( - ref self: T, - profile_address: ContractAddress, - content_URI: ByteArray, - pointed_profile_address: ContractAddress, - pointed_pub_id: u256, - profile_contract_address: ContractAddress, - ) -> u256; - fn mirror( - ref self: T, mirrorParams: MirrorParams, profile_contract_address: ContractAddress - ) -> u256; - fn quote(ref self: T, quoteParams: QuoteParams) -> u256; - ////// Getters////// - fn get_publication(self: @T, user: ContractAddress, pubIdAssigned: u256) -> Publication; - fn get_publication_type( - self: @T, profile_address: ContractAddress, pub_id_assigned: u256 - ) -> PublicationType; - fn get_publication_content_uri( - self: @T, profile_address: ContractAddress, pub_id: u256 - ) -> ByteArray; -} #[starknet::contract] pub mod Publications { @@ -56,7 +20,7 @@ pub mod Publications { PostParams, Publication, PublicationType, ReferencePubParams, CommentParams, QuoteParams, MirrorParams }; - use super::IKarstPublications; + use karst::interfaces::IPublication::IKarstPublications; use karst::interfaces::IProfile::{IKarstProfileDispatcher, IKarstProfileDispatcherTrait}; use karst::base::errors::Errors::{NOT_PROFILE_OWNER, BLOCKED_STATUS}; use karst::base::{hubrestricted::HubRestricted::hub_only}; @@ -102,10 +66,6 @@ pub mod Publications { } - // ************************************************************************* - // CONSTRUCTOR - // ************************************************************************* - // ************************************************************************* // EXTERNAL FUNCTIONS // ************************************************************************* @@ -175,8 +135,6 @@ pub mod Publications { mirrorParams: MirrorParams, profile_contract_address: ContractAddress ) -> u256 { - // logic here - assert!( profile_contract_address.into() != 0, "Contract Profile Address cannot be zero" ); @@ -219,7 +177,6 @@ pub mod Publications { } fn quote(ref self: ContractState, quoteParams: QuoteParams) -> u256 { - // logic here 0 } // *************************************************************************