Skip to content

Science - #1

Open
blessychoco wants to merge 7 commits into
mainfrom
science
Open

Science#1
blessychoco wants to merge 7 commits into
mainfrom
science

Conversation

@blessychoco

Copy link
Copy Markdown
Owner

Implement ResearchChain Smart Contract and Update README

Description
This pull request introduces the ResearchChain smart contract, a decentralized scientific research funding platform implemented on the Stacks blockchain, along with its corresponding README documentation.

Key Features Implemented

  1. Proposal Submission: Researchers can submit funding proposals.
  2. Review System: Authorized reviewers can vote on proposals.
  3. Funding Mechanism: Approved proposals can receive funding from supporters.
  4. Withdrawal Process: Researchers can withdraw funds for fully funded proposals.
  5. Refund System: Funders can request refunds under specific conditions.
  6. Role-based Access Control: Distinct roles for researchers, reviewers, funders, and contract owner.
  7. Configurable Parameters: Adjustable required votes and funding period.

Contract Changes

  • Implemented core data structures: proposals, fundings, reviewers, and votes maps.
  • Added public functions for proposal lifecycle management:
    • submit-proposal
    • vote-on-proposal
    • fund-proposal
    • withdraw-funds
    • request-refund
  • Implemented administrative functions:
    • update-proposal-status
    • add-reviewer
    • remove-reviewer
    • set-required-votes
    • set-funding-period
  • Added read-only functions for querying contract state.
  • Implemented error handling with specific error codes.

README Updates

  • Provided a comprehensive overview of the ResearchChain smart contract.
  • Detailed the contract structure, proposal lifecycle, and key functions.
  • Included instructions on how to use the contract.
  • Listed and explained all error codes.
  • Added security considerations and disclaimer.

Testing

  • The contract includes input validation and role checks for all public functions.
  • Error scenarios are handled with specific error codes.
  • (Note: Formal testing should be conducted before deployment to mainnet)

Next Steps

  • Implement front-end interface for interacting with the contract.
  • Conduct thorough testing, including edge cases and potential attack vectors.
  • Consider adding events for important state changes to facilitate off-chain tracking.

Checklist

  • Smart contract implementation
  • README documentation
  • Error handling and input validation
  • Unit tests (to be added)
  • Integration tests (to be added)
  • Security audit (to be conducted)

I would greatly appreciate a thorough review and any feedback on both the contract implementation and documentation. Please let me know if any areas need further clarification or improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant