Skip to content

Commit

Permalink
fix: also in shipyard mint check for unique asteria input
Browse files Browse the repository at this point in the history
  • Loading branch information
francolq committed Feb 20, 2025
1 parent 58652b3 commit 8ac63df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions onchain/src/validators/spacetime.ak
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ validator spacetime(

when redeemer is {
MintShip -> {
expect Some(asteria_input) =
list.find(
// exactly one valid asteria input is present
expect [asteria_input] =
list.filter(
inputs,
fn(input) {
when input.output.address.payment_credential is {
Expand All @@ -288,6 +289,7 @@ validator spacetime(
pairs.get_all(redeemers, asteria_purpose) == [asteria_redeemer]
}

// no need to check minted amounts here as it is checked in asteria
and {
must_be_valid_asteria?,
must_be_correct_purpose?,
Expand Down

0 comments on commit 8ac63df

Please sign in to comment.