feat: comprehensive test suite and IPFS upload component#12
Merged
Conversation
|
@teethaking is attempting to deploy a commit to the tee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #11
Closes #3
feat: comprehensive test suite + IPFS upload component for milestone submissions
Summary
Two major additions ahead of mainnet deployment and audit:
GrantStreamEscrow.solChanges
test/GrantStreamEscrow.test.js— 80 tests, 0 failuresReplaces the previous 7-test stub with full coverage across 11 suites:
Key areas covered:
NotFunder,NotGrantee,NotVerifier,InvalidStatus,GrantAlreadyFunded, etc.)Pending → Submitted → Approved/Rejected → Paid)Paidbefore thesafeTransferfires, blocking any re-entrant approval attemptgrantstream.html— IPFS upload componentNew "Submit Milestone Proof" modal with a two-tab uploader:
Upload File tab
ipfs://Qm…CID client-side using SubtleCrypto SHA-256 so the full flow works without a keyIPFS / URL Link tab
ipfs://Qm…, bare CIDv0, bare CIDv1 (bafy…), or anyhttps://URLipfs://URI schemeipfs.io) opens the content before submittingOn-chain wiring
submitMilestoneOnChain()callscontract.submitMilestone(grantId, milestoneIdx, uri)— matching the exactGrantStreamEscrowABI signatureVerifier panel
ipfs://URIs, direct href for https)Testing
Notes for reviewers
getNftStorageKey()ingrantstream.html(NFT.Storage, Pinata, or web3.storage all work)GrantStreamEscrow.solandMockUSDC.solare untouched