Skip to content

Heleolabs/lottery blueprint#7

Open
D45putspin wants to merge 3 commits intoHathorNetwork:masterfrom
D45putspin:heleolabs/lottery-blueprint
Open

Heleolabs/lottery blueprint#7
D45putspin wants to merge 3 commits intoHathorNetwork:masterfrom
D45putspin:heleolabs/lottery-blueprint

Conversation

@D45putspin
Copy link

This blueprint implements a single‑round HTR lottery. The creator initializes the contract with a description, ticket price, and commission percentage, and pays a 10 HTR creation fee. Participants buy tickets by depositing HTR, which accumulates in the pot. The creator can draw a winner at any time before a 30‑day timeout; after the timeout, anyone can draw. The contract computes the commission and prize, tracks creator and winner payouts separately, and allows each party to claim their rewards via withdrawal actions. Events are emitted for creation, ticket purchases, winner selection, and reward claims.

@github-project-automation github-project-automation bot moved this from Submitted to Review Done in Community Blueprints Feb 19, 2026
@D45putspin D45putspin requested a review from jansegre February 23, 2026 09:24
@D45putspin D45putspin force-pushed the heleolabs/lottery-blueprint branch from f001b42 to dd6483f Compare February 23, 2026 15:01
glevco
glevco previously approved these changes Feb 23, 2026
@glevco glevco moved this from Review Done to In Review in Community Blueprints Feb 23, 2026
Change get_state() to dict[str, str] and stringify numeric fields so the wallet/localnet mapper accepts the view return type.
@github-project-automation github-project-automation bot moved this from In Review to Approved in Community Blueprints Feb 26, 2026
@glevco
Copy link
Contributor

glevco commented Feb 26, 2026

The blueprint Lottery, contained in blueprints/lottery/lottery.py, is approved for release on the Hathor mainnet in accordance with the restricted blueprints policies.

This approval DOES NOT include any review of the blueprint's business logic, correctness, or security. Hathor does not perform such assessments. Full responsibility for the blueprint's behavior and any resulting consequences rests solely with its author.

@msbrogli
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved

Development

Successfully merging this pull request may close these issues.

4 participants