Skip to content

Commit

Permalink
reminder: every action of the withdraw validator must check both mint…
Browse files Browse the repository at this point in the history
… and inputs
  • Loading branch information
MicroProofs committed Sep 18, 2023
1 parent 364c677 commit 0e71d9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions validators/hard_fork.ak
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,13 @@ validator(init_utxo_ref: OutputReference, fortuna_v1_hash: ByteArray) {
}

[script_input1, script_input2] -> {
// Expect only 1 minted token, we validate the output to check token name
expect [] =
mint
|> value.from_minted_value
|> value.tokens(own_policy)
|> dict.to_list

expect InlineDatum(datum) = script_input1.datum

expect script1_datum: ForkDatum = datum
Expand Down

0 comments on commit 0e71d9e

Please sign in to comment.