feat: Solidity escrow contract implementation (#1)#15
Merged
teethaking merged 1 commit intoJun 8, 2026
Conversation
|
@Sycosmile is attempting to deploy a commit to the tee's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Solidity escrow contract implementation
Closes #1
Summary
Implements the core
GrantStream.solescrow contract as described in issue #1. Funders can lock ETH across multiple milestones in a single transaction; each tranche is only released when the grantee submits IPFS evidence and the designated verifier approves it on-chain.What's included
contracts/GrantStream.solcreateGrant()— funder locks ETH for all milestones in one tx, emitsGrantCreatedsubmitEvidence()— grantee attaches an IPFS URI per milestone (ipfs://Qm...)approveMilestone()— verifier releases that milestone's ETH to the granteerejectMilestone()— verifier rejects; grantee can resubmit evidencecancelGrant()— funder cancels and receives refund of all unreleased funds (blocked while any milestone isSUBMITTEDto prevent griefing)GrantCreated,EvidenceSubmitted,MilestoneApproved,MilestoneRejected,GrantCancelled,GrantCompleted) — ready to feed the Activity Feed UItest/GrantStream.test.jsMilestone status flow implemented
How to test
npm install npx hardhat testNotes
^0.8.20— compatible with the Hardhat configVITE_IPFS_GATEWAY) from.env.examplegetGrantsByFunder()andgetGrantsByGrantee()view helpers are included to support frontend querying without indexingHappy to make any adjustments based on review. Let me know if you'd like the verifier role extended to support multisig (for Issue #10 down the line).