Skip to content

Comments

feat(contract): scaffold submit_feedback#54

Merged
Kaylahray merged 3 commits intoQuid-proquo:mainfrom
phertyameen:feat/scaffold_submit_feedback
Feb 24, 2026
Merged

feat(contract): scaffold submit_feedback#54
Kaylahray merged 3 commits intoQuid-proquo:mainfrom
phertyameen:feat/scaffold_submit_feedback

Conversation

@phertyameen
Copy link
Contributor

Closes #39
Implements the submit_feedback function allowing hunters
to submit an IPFS CID for a given mission.

Changes

  • Add submit_feedback(env, mission_id, hunter, ipfs_cid) to contract impl
  • Requires hunter.require_auth() before any state is written
  • Persists ipfs_cid under DataKey::Submission(mission_id, hunter) in persistent storage

Tests

  • Stores and retrieves CID correctly from persistent storage
  • Overwrites previous submission (last-write-wins documented)
  • Different hunters on the same mission have independent storage keys
  • Same hunter on different missions has independent storage keys
  • Fails without hunter auth (#[should_panic])
  • Asserts hunter is the exact authorising address via env.auths()

Testing

cargo test

@Kaylahray Kaylahray merged commit 7543f6b into Quid-proquo:main Feb 24, 2026
2 checks passed
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.

[Contract] Implement 'submit_feedback'

2 participants