File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ //! # Action
2+ //!
3+ //! Actions use predicates to generate solutions.
4+
5+ use essential_types:: { PredicateAddress , Value } ;
6+
7+ /// Actions represent are used as the input to solve a predicate
8+ /// and generate a [`Solution`](essential_types::Solution).
9+ pub struct Action {
10+ /// The predicate that will be solved by this action.
11+ pub predicate_to_solve : PredicateAddress ,
12+ /// The inputs to the predicate.
13+ pub inputs : Vec < Value > ,
14+ }
15+
16+ /// An atomic unordered set of actions.
17+ /// These all occur at the same time.
18+ /// It is invalid for the solutions generated
19+ /// by these actions to mutate the same keys.
20+ pub struct ActionSet {
21+ /// An unordered set of actions.
22+ pub actions : Vec < Action > ,
23+ }
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ use essential_types::{
1414} ;
1515use serde:: { Deserialize , Serialize } ;
1616
17+ pub mod action;
1718pub mod block;
1819
1920/// Wrappers around tokio's `watch` channel for notifying of new blocks.
You can’t perform that action at this time.
0 commit comments