Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Update flows
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdean-digicatapult committed Nov 24, 2023
1 parent 26988d6 commit d9160ae
Show file tree
Hide file tree
Showing 3 changed files with 384 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

token InitiatedCert {
hydrogen_owner: Role,
proposed_energy_owner: Role,
hydrogen_amount: Literal,
energy_owner: Role,
hydrogen_quantity_mwh: Literal,
commitment: Literal,
}

token IssuedCert {
Expand All @@ -30,16 +31,15 @@ token IssuedCert {
* public `fn` will be published as a process flow (`fn`s can also be private)
*/

pub fn process_initiate_cert || => |output: InitiatedCert| where {
pub fn initiate_cert || => |output: InitiatedCert| where {
output.hydrogen_owner == sender,
output.proposed_energy_owner != sender,
output.hydrogen_amount: Literal,
output.energy_owner != sender,
}

pub fn process_issue_cert |input: InitiatedCert| => |output: IssuedCert| where {
pub fn issue_cert |input: InitiatedCert| => |output: IssuedCert| where {
output == input,
input.hydrogen_owner == output.hydrogen_owner,
input.proposed_energy_owner == output.energy_owner,
input.energy_owner == output.energy_owner,
output.hydrogen_owner != sender,
output.energy_owner == sender,
output.embodied_co2: Literal,
}
Loading

0 comments on commit d9160ae

Please sign in to comment.