Skip to content
Open
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ playwright-report/
test-results/
# E2E output
frontend/e2e/results/
# Vitest UI output
.vitest-cache/
# k6 / load-test output
k6-results/

# ──────────────────────────────────────────────────────────────────────────────
# Generated docs / summaries (do not commit generated docs)
Expand Down
6 changes: 3 additions & 3 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ members = [
"zk_proof_verifier",
"certificate",
"storage_ttl_manager",
]
# Incomplete or non-crate directories under contracts/ must not be listed as members.
exclude = [
"automated_testing_suite",
"cicd_pipeline",
"contract_events",
"peer_review",
]
# All contract crates are now fully reconciled into the workspace.

[profile.release]
opt-level = "z"
Expand Down
18 changes: 18 additions & 0 deletions contracts/contract_events/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ pub fn publish_transfer(env: &Env, from: &Address, to: &Address, amount: i128) {
// ---------------------------------------------------------------------------

/// Decoded [`topic::TRADE`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct TradeEvent {
pub trader: Address,
Expand All @@ -360,6 +361,7 @@ pub struct TradeEvent {
}

/// Decoded [`topic::PAUSE`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PauseEvent {
pub admin: Address,
Expand All @@ -368,6 +370,7 @@ pub struct PauseEvent {
}

/// Decoded [`topic::FEE_WITHDRAW`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct FeeWithdrawEvent {
pub admin: Address,
Expand All @@ -377,6 +380,7 @@ pub struct FeeWithdrawEvent {
}

/// Decoded [`topic::VAULT_LOCK`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct VaultLockEvent {
pub party: Address,
Expand All @@ -387,6 +391,7 @@ pub struct VaultLockEvent {
}

/// Decoded [`topic::SHARES_MINTED`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SharesMintedEvent {
pub recipient: Address,
Expand All @@ -396,6 +401,7 @@ pub struct SharesMintedEvent {
}

/// Decoded [`topic::BID`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct BidEvent {
pub bidder: Address,
Expand All @@ -405,6 +411,7 @@ pub struct BidEvent {
}

/// Decoded [`topic::AUCTION`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct AuctionEvent {
pub winner: Address,
Expand All @@ -415,6 +422,7 @@ pub struct AuctionEvent {
}

/// Decoded [`topic::PAYOUT`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct PayoutEvent {
pub holder: Address,
Expand All @@ -423,6 +431,7 @@ pub struct PayoutEvent {
}

/// Decoded [`topic::SUBMISSION`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SubmissionEvent {
pub creator: Address,
Expand All @@ -434,6 +443,7 @@ pub struct SubmissionEvent {
}

/// Decoded [`topic::STAKE`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct StakeEvent {
pub reviewer: Address,
Expand All @@ -444,6 +454,7 @@ pub struct StakeEvent {
}

/// Decoded [`topic::COMMIT`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CommitEvent {
pub reviewer: Address,
Expand All @@ -453,6 +464,7 @@ pub struct CommitEvent {
}

/// Decoded [`topic::REVEAL`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct RevealEvent {
pub reviewer: Address,
Expand All @@ -462,6 +474,7 @@ pub struct RevealEvent {
}

/// Decoded [`topic::REVIEW_DONE`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct ReviewDoneEvent {
pub submission_id: u64,
Expand All @@ -472,6 +485,7 @@ pub struct ReviewDoneEvent {
}

/// Decoded [`topic::SLASH`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct SlashEvent {
pub reviewer: Address,
Expand All @@ -481,6 +495,7 @@ pub struct SlashEvent {
}

/// Decoded [`topic::ENROLL`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct EnrollmentEvent {
pub student: Address,
Expand All @@ -490,6 +505,7 @@ pub struct EnrollmentEvent {
}

/// Decoded [`topic::MILESTONE`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct MilestoneEvent {
pub student: Address,
Expand All @@ -499,6 +515,7 @@ pub struct MilestoneEvent {
}

/// Decoded [`topic::CERT_MINT`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct CertificateMintEvent {
pub student: Address,
Expand All @@ -507,6 +524,7 @@ pub struct CertificateMintEvent {
}

/// Decoded [`topic::TRANSFER`] event.
#[soroban_sdk::contractevent]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct TransferEvent {
pub from: Address,
Expand Down
90 changes: 80 additions & 10 deletions contracts/hackathon-team-matching/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,79 @@
#![no_std]
use soroban_sdk::{
contract, contracterror, contractimpl, contracttype, panic_with_error, symbol_short, Address,
contract, contracterror, contractevent, contractimpl, contracttype, panic_with_error, Address,
Env, Symbol, Vec,
};

// ---------------------------------------------------------------------------
// Typed event schemas — SC-HARD-02 migration
// ---------------------------------------------------------------------------

/// Emitted when a new developer profile is registered.
#[contractevent]
pub struct DeveloperRegistered {
pub developer: Address,
}

/// Emitted when a new team is created.
#[contractevent]
pub struct TeamCreated {
pub creator: Address,
pub team_id: u64,
pub name: Symbol,
}

/// Emitted when a developer submits a join request.
#[contractevent]
pub struct JoinRequested {
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a join request is accepted.
#[contractevent]
pub struct JoinAccepted {
pub creator: Address,
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a developer is invited to a team.
#[contractevent]
pub struct DeveloperInvited {
pub creator: Address,
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a developer accepts a team invitation.
#[contractevent]
pub struct InvitationAccepted {
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a developer leaves a team.
#[contractevent]
pub struct TeamLeft {
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a member is removed from a team.
#[contractevent]
pub struct MemberRemoved {
pub creator: Address,
pub developer: Address,
pub team_id: u64,
}

/// Emitted when a team is closed.
#[contractevent]
pub struct TeamClosed {
pub creator: Address,
pub team_id: u64,
}

#[contracterror]
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum MatchingError {
Expand Down Expand Up @@ -132,7 +202,7 @@ impl HackathonTeamMatching {
.set(&DataKey::AllDevelopers, &all_devs);

env.events()
.publish((symbol_short!("dev_reg"), developer), ());
.publish((DeveloperRegistered { developer },), ());
}

/// Retrieve a developer profile
Expand Down Expand Up @@ -201,7 +271,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Developer(creator.clone()), &creator_dev);

env.events()
.publish((symbol_short!("team_new"), creator), (team_id, name));
.publish((TeamCreated { creator, team_id, name },), ());
team_id
}

Expand Down Expand Up @@ -260,7 +330,7 @@ impl HackathonTeamMatching {
}

env.events()
.publish((symbol_short!("join_req"), developer), team_id);
.publish((JoinRequested { developer, team_id },), ());
}

/// Accept a developer's join request (team creator only)
Expand Down Expand Up @@ -329,7 +399,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Team(team_id), &team);

env.events()
.publish((symbol_short!("join_acc"), creator), (developer, team_id));
.publish((JoinAccepted { creator, developer, team_id },), ());
}

/// Invite a developer to join the team (team creator only)
Expand Down Expand Up @@ -385,7 +455,7 @@ impl HackathonTeamMatching {
}

env.events()
.publish((symbol_short!("invite_d"), creator), (developer, team_id));
.publish((DeveloperInvited { creator, developer, team_id },), ());
}

/// Accept a team's invitation (developer only)
Expand Down Expand Up @@ -451,7 +521,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Team(team_id), &team);

env.events()
.publish((symbol_short!("invite_a"), developer), team_id);
.publish((InvitationAccepted { developer, team_id },), ());
}

/// Leave the current team (non-creator member only)
Expand Down Expand Up @@ -505,7 +575,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Team(team_id), &team);

env.events()
.publish((symbol_short!("team_lv"), developer), team_id);
.publish((TeamLeft { developer, team_id },), ());
}

/// Remove a member from the team (team creator only)
Expand Down Expand Up @@ -561,7 +631,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Team(team_id), &team);

env.events()
.publish((symbol_short!("team_rm"), creator), (developer, team_id));
.publish((MemberRemoved { creator, developer, team_id },), ());
}

/// Close the team, finalizing members (team creator only)
Expand All @@ -585,7 +655,7 @@ impl HackathonTeamMatching {
.set(&DataKey::Team(team_id), &team);

env.events()
.publish((symbol_short!("team_cls"), creator), team_id);
.publish((TeamClosed { creator, team_id },), ());
}

/// Find matching teams for a developer
Expand Down
53 changes: 53 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Dependencies — reinstalled inside the image
node_modules/
.pnpm-store/

# Next.js build artefacts (copied selectively from builder stage)
.next/
out/

# Development & test files
*.test.ts
*.test.tsx
*.spec.ts
*.spec.tsx
__tests__/
__snapshots__/
*.snap
e2e/
playwright-report/
test-results/
coverage/

# Local environment overrides
.env
.env.local
.env.development
.env.development.local
.env.test
.env.test.local

# Editor / IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Docs & README files
*.md
LICENSE

# Git
.git/
.gitignore

# Husky / lint-staged
.husky/

# Sentry source maps (optional — sent separately via Sentry CLI)
.sentryclirc
sentry.*.config.ts
Loading