Repository navigation
Implement Merchant model #39
Description
Activity
- addedGrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26
on Jul 20, 2026 Hi maintainers, I can handle this one. I'll implement it to spec and add tests. I'll open a PR referencing this shortly once assigned.
giftexceed commented
on Jul 20, 2026 ContributorMore actionsI'd like to work on this issue.
I'm a backend and blockchain developer with experience in smart contract security, system architecture, and technical documentation. I've worked on threat modeling, access control, event-driven systems, and documenting security assumptions for blockchain applications.
For this issue, I will produce a comprehensive STRIDE threat model covering all specified trust boundaries, include clear data flow diagrams, severity assessments, and mitigation mappings, and identify any unmitigated high-risk findings with links to corresponding GitHub issues. I'll ensure the document is well-structured, reviewable, and linked from the project README to support future security audits.
davieslennox0 commented
on Jul 20, 2026 More actionsLet me get my hands on this for a quick resolve.
grantfox-oss commented
on Jul 22, 2026 grantfox-ossboton Jul 22, 2026 – with GrantFox OSSMore actions🦊 GrantFox — @giftexceed has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
- Open a Pull Request referencing this issue (e.g.,
Closes #39) - Your PR will be reviewed by the ShadeProtocol maintainers
Good luck! Track your progress on GrantFox.
- Open a Pull Request referencing this issue (e.g.,
grantfox-oss commented
on Jul 24, 2026 grantfox-ossboton Jul 24, 2026 – with GrantFox OSSMore actions🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!
@giftexceed's PR #45 was approved and merged by @codebestia.
🏆 @giftexceed: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (592 total points). Track your full progress on GrantFox.
👏 Great work, @giftexceed! Keep contributing to ShadeProtocol.
- added a commit that references this issue
on Jul 24, 2026 - added a commit that references this issue
on Jul 24, 2026
The Python
Merchantmodel must mirror the Shade backend's Prisma schema exactly. Field names are converted fromcamelCase(Prisma/JSON) tosnake_case(Python). Themerchant_idfield (frommerchantId: Int) is the numeric identifier stored by the Soroban contract on every invoice, making it the bridge between the backend and the on-chain world.Proposed Steps:
src/shade/models/merchant.py.Merchant(ShadeObject)with PydanticField(alias=...)for camelCase ↔ snake_case mapping.id: str,merchant_id: int,address: str,account: Optional[str],email: Optional[str],first_name: Optional[str],last_name: Optional[str],business_name: Optional[str],category: Optional[str],description: Optional[str],logo: Optional[str],webhook: Optional[str],active: bool,verified: bool.display_namecomputed property: returnsbusiness_nameif set, else"{first_name} {last_name}".strip(), elseemail.addressis a valid Stellar public key (starts withG, 56 chars).Acceptance Criteria:
Merchant.from_dict(api_response)correctly maps camelCase fields to snake_case attributes.merchant.merchant_idis anint.addressraisesInvalidRequestErroron construction.merchant.display_namereturns the most informative available name.settingsdict — all fields are explicitly typed.