Skip to content

Conversation

@gelluisaac
Copy link
Contributor

@gelluisaac gelluisaac commented May 31, 2025

close #100
This PR adds a standalone smart contract in the onchain directory to manage projects under organizations in the BudgetChain app.

🔧 Features
Defines a Project struct with fields:

id, org, owner, total_budget, remaining_budget

Allows authorized organizations to create projects via create_project

Uses access control (PROJECT_CREATOR_ROLE) to restrict project creation

Stores all projects and tracks the total number of projects

Emits a ProjectAllocated event on creation

Includes getter functions:

get_project

get_project_count

has_project_creator_role

✅ Validations
Ensures only authorized users can create projects

Validates non-zero project owner and budget

@vercel
Copy link

vercel bot commented May 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
budget-chain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2025 7:12am

Copy link
Contributor

@anonfedora anonfedora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM...

@anonfedora anonfedora merged commit 2a2bb33 into BudgetChain:main Jun 3, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Project Management Contract

2 participants