Skip to content

Commit

Permalink
Added field and function declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
aii23 committed May 21, 2024
1 parent 7489ce4 commit 8fd378b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Lottery.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import { Field, SmartContract, state, State, method } from 'o1js';

export class Lottery extends SmartContract {
@state(Field) ticketRoot = State<Field>();
@state(Field) ticketAmountRoot = State<Field>();
@state(Field) roundResultRoot = State<Field>();

init() {
super.init();

// #TODO Permisions
}

@method async buyTicket(ticketHash: Field, amount: Field) {
// #TODO
}

@method async produceResult(round: Field) {
// #TODO
}

@method async getReward(ticketHash: Field) {
// #TODO
}
}

0 comments on commit 8fd378b

Please sign in to comment.