-
Notifications
You must be signed in to change notification settings - Fork 0
Scoring chain #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoring chain #15
Changes from all commits
fb17b10
8596a9d
37a0384
4e2b2bf
a5c6bf7
fe473b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ pub mod game; | |
| use async_graphql::{Request, Response}; | ||
| use linera_sdk::{ | ||
| graphql::GraphQLMutationRoot, | ||
| linera_base_types::{ContractAbi, DataBlobHash, ServiceAbi}, | ||
| linera_base_types::{AccountOwner, ContractAbi, DataBlobHash, ServiceAbi}, | ||
| }; | ||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
|
|
@@ -29,6 +29,14 @@ pub enum Operation { | |
| puzzle_id: DataBlobHash, | ||
| /// The board of the solution. | ||
| board: Board, | ||
| /// Optional owner to credit instead of the current authenticated owner. | ||
| owner: Option<AccountOwner>, | ||
|
||
| }, | ||
| // Scoring appchain only | ||
| /// Register a puzzle to activate scoring for it. | ||
| RegisterPuzzle { | ||
| /// The ID of the puzzle to register. | ||
| puzzle_id: DataBlobHash, | ||
| }, | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not from this PR but): I'd expect this API to be the other way around–
puzzle.check_solution(&board). Aboardis a solution to a specificpuzzle(a puzzle can have many different solutions/boards but a board can be a solution to one puzzle).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair. Let me look