Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Integrate Testing for version v2.8.3 #116

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ alexandria_bytes = { git = "https://github.com/keep-starknet-strange/alexandria.

[dev-dependencies]
snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v0.31.0" }
cairo_test = "2.8.2"


[sncast.default]
url= "https://starknet-sepolia.public.blastapi.io"
Expand Down
42 changes: 21 additions & 21 deletions src/follownft/follownft.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub mod Follow {
// *************************************************************************
#[event]
#[derive(Drop, starknet::Event)]
enum Event {
pub enum Event {
#[flat]
ERC721Event: ERC721Component::Event,
#[flat]
Expand All @@ -79,35 +79,35 @@ pub mod Follow {
}

#[derive(Drop, starknet::Event)]
struct Followed {
followed_address: ContractAddress,
follower_address: ContractAddress,
follow_id: u256,
timestamp: u64,
pub struct Followed {
pub followed_address: ContractAddress,
pub follower_address: ContractAddress,
pub follow_id: u256,
pub timestamp: u64,
}

#[derive(Drop, starknet::Event)]
struct Unfollowed {
unfollowed_address: ContractAddress,
unfollower_address: ContractAddress,
follow_id: u256,
timestamp: u64,
pub struct Unfollowed {
pub unfollowed_address: ContractAddress,
pub unfollower_address: ContractAddress,
pub follow_id: u256,
pub timestamp: u64,
}

#[derive(Drop, starknet::Event)]
struct FollowerBlocked {
followed_address: ContractAddress,
blocked_follower: ContractAddress,
follow_id: u256,
timestamp: u64,
pub struct FollowerBlocked {
pub followed_address: ContractAddress,
pub blocked_follower: ContractAddress,
pub follow_id: u256,
pub timestamp: u64,
}

#[derive(Drop, starknet::Event)]
struct FollowerUnblocked {
followed_address: ContractAddress,
unblocked_follower: ContractAddress,
follow_id: u256,
timestamp: u64,
pub struct FollowerUnblocked {
pub followed_address: ContractAddress,
pub unblocked_follower: ContractAddress,
pub follow_id: u256,
pub timestamp: u64,
}

// *************************************************************************
Expand Down
9 changes: 5 additions & 4 deletions src/karstnft/karstnft.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ pub mod KarstNFT {
use core::num::traits::zero::Zero;
use karst::interfaces::IKarstNFT;
use karst::base::{
constants::errors::Errors::ALREADY_MINTED, token_uris::profile_token_uri::ProfileTokenUri,
constants::errors::Errors::ALREADY_MINTED,
token_uris::profile_token_uri::ProfileTokenUri::get_token_uri,
};
use openzeppelin::{
access::ownable::OwnableComponent, token::erc721::{ERC721Component, ERC721HooksEmptyImpl},
Expand Down Expand Up @@ -124,18 +125,18 @@ pub mod KarstNFT {
// *************************************************************************
/// @notice returns the collection name
fn name(self: @ContractState) -> ByteArray {
return "Karst Handles";
return "Karst";
}

/// @notice returns the collection symbol
fn symbol(self: @ContractState) -> ByteArray {
return "KARST";
return "KST";
}

/// @notice returns the token_uri for a particular token_id
fn token_uri(self: @ContractState, token_id: u256) -> ByteArray {
let mint_timestamp: u64 = self.get_token_mint_timestamp(token_id);
ProfileTokenUri::get_token_uri(token_id, mint_timestamp)
get_token_uri(token_id, mint_timestamp)
}
}
}
16 changes: 8 additions & 8 deletions src/namespaces/handle_registry.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ pub mod HandleRegistry {

#[derive(Drop, starknet::Event)]
pub struct HandleLinked {
handle_id: u256,
profile_address: ContractAddress,
caller: ContractAddress,
timestamp: u64
pub handle_id: u256,
pub profile_address: ContractAddress,
pub caller: ContractAddress,
pub timestamp: u64
}

#[derive(Drop, starknet::Event)]
pub struct HandleUnlinked {
handle_id: u256,
profile_address: ContractAddress,
caller: ContractAddress,
timestamp: u64
pub handle_id: u256,
pub profile_address: ContractAddress,
pub caller: ContractAddress,
pub timestamp: u64
}

// *************************************************************************
Expand Down
18 changes: 9 additions & 9 deletions src/namespaces/handles.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub mod Handles {
// *************************************************************************
#[event]
#[derive(Drop, starknet::Event)]
enum Event {
pub enum Event {
#[flat]
ERC721Event: ERC721Component::Event,
#[flat]
Expand All @@ -89,18 +89,18 @@ pub mod Handles {

#[derive(Drop, starknet::Event)]
pub struct HandleMinted {
local_name: felt252,
token_id: u256,
to: ContractAddress,
block_timestamp: u64,
pub local_name: felt252,
pub token_id: u256,
pub to: ContractAddress,
pub block_timestamp: u64,
}

#[derive(Drop, starknet::Event)]
pub struct HandleBurnt {
local_name: felt252,
token_id: u256,
owner: ContractAddress,
block_timestamp: u64,
pub local_name: felt252,
pub token_id: u256,
pub owner: ContractAddress,
pub block_timestamp: u64,
}

// *************************************************************************
Expand Down
8 changes: 4 additions & 4 deletions src/profile/profile.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ pub mod ProfileComponent {
#[derive(Drop, starknet::Event)]
pub struct CreatedProfile {
#[key]
owner: ContractAddress,
pub owner: ContractAddress,
#[key]
profile_address: ContractAddress,
token_id: u256,
timestamp: u64
pub profile_address: ContractAddress,
pub token_id: u256,
pub timestamp: u64
}

// *************************************************************************
Expand Down
36 changes: 18 additions & 18 deletions src/publication/publication.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,40 @@ pub mod PublicationComponent {

#[derive(Drop, starknet::Event)]
pub struct Post {
post: PostParams,
publication_id: u256,
transaction_executor: ContractAddress,
block_timestamp: u64,
pub post: PostParams,
pub publication_id: u256,
pub transaction_executor: ContractAddress,
pub block_timestamp: u64,
}

#[derive(Drop, starknet::Event)]
pub struct RepostCreated {
repostParams: RepostParams,
publication_id: u256,
transaction_executor: ContractAddress,
block_timestamp: u64,
pub repostParams: RepostParams,
pub publication_id: u256,
pub transaction_executor: ContractAddress,
pub block_timestamp: u64,
}

#[derive(Drop, starknet::Event)]
pub struct CommentCreated {
commentParams: CommentParams,
publication_id: u256,
transaction_executor: ContractAddress,
block_timestamp: u64,
pub commentParams: CommentParams,
pub publication_id: u256,
pub transaction_executor: ContractAddress,
pub block_timestamp: u64,
}

#[derive(Drop, starknet::Event)]
pub struct Upvoted {
publication_id: u256,
transaction_executor: ContractAddress,
block_timestamp: u64,
pub publication_id: u256,
pub transaction_executor: ContractAddress,
pub block_timestamp: u64,
}

#[derive(Drop, starknet::Event)]
pub struct Downvoted {
publication_id: u256,
transaction_executor: ContractAddress,
block_timestamp: u64,
pub publication_id: u256,
pub transaction_executor: ContractAddress,
pub block_timestamp: u64,
}

// *************************************************************************
Expand Down
Loading
Loading