Skip to main content
formatting
Source Link
eddex
  • 3.7k
  • 2
  • 12
  • 44

Validator always accept an Mintaccepts and Mints (but it shouldn't)

Hey I have this simple stupid validator:

validator {
  fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
    let ScriptContext { transaction, purpose } = context
    when purpose is {
      Mint(policy_id) -> False
      _ -> False
    }
  }
}

validator {
  fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
    let ScriptContext { transaction, purpose } = context
    when purpose is {
      Mint(policy_id) -> False
      _ -> False
    }
  }
}

Now when performing a call to this validator to Mint it still returns TrueTrue for the transaction and the native token is minted. ImI'm confused, how this can this be?

Validator always accept an Mint

Hey I have this simple stupid validator

validator {
  fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
    let ScriptContext { transaction, purpose } = context
    when purpose is {
      Mint(policy_id) -> False
      _ -> False
    }
  }
}

Now when performing a call to this validator to Mint it still returns True for the transaction and the native token is minted. Im confused how this can be?

Validator always accepts and Mints (but it shouldn't)

Hey I have this simple stupid validator:

validator {
  fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
    let ScriptContext { transaction, purpose } = context
    when purpose is {
      Mint(policy_id) -> False
      _ -> False
    }
  }
}

Now when performing a call to this validator to Mint it still returns True for the transaction and the native token is minted. I'm confused, how can this be?

Source Link

Validator always accept an Mint

Hey I have this simple stupid validator

validator {
  fn nft(datum: Datum, _redeemer: Void, context: ScriptContext) {
    let ScriptContext { transaction, purpose } = context
    when purpose is {
      Mint(policy_id) -> False
      _ -> False
    }
  }
}

Now when performing a call to this validator to Mint it still returns True for the transaction and the native token is minted. Im confused how this can be?