Repository navigation
Closed
Labels
GrantFox 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 | FWC26area:modelspriority:p1type:feature
Description
The Python Merchant model must mirror the Shade backend's Prisma schema exactly. Field names are converted from camelCase (Prisma/JSON) to snake_case (Python). The merchant_id field (from merchantId: 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:
- Create
src/shade/models/merchant.py. - Define
Merchant(ShadeObject)with PydanticField(alias=...)for camelCase ↔ snake_case mapping. - Fields:
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. - Add
display_namecomputed property: returnsbusiness_nameif set, else"{first_name} {last_name}".strip(), elseemail. - Validate
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.- A non-Stellar
addressraisesInvalidRequestErroron construction. merchant.display_namereturns the most informative available name.- The model has no generic
settingsdict — all fields are explicitly typed.
Metadata
Metadata
Assignees
Labels
GrantFox 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 | FWC26area:modelspriority:p1type:feature
Activity
GBOYEE commentedon 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 commentedon Jul 20, 2026
I'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 commentedon Jul 20, 2026
Let me get my hands on this for a quick resolve.
grantfox-oss commentedon Jul 22, 2026
🦊 GrantFox — @giftexceed has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
Closes #39)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jul 24, 2026
🎉 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.
Merge pull request #45 from giftexceed/feat/39-merchant-model
feat: implement Merchant model mirroring backend Prisma schema