feat: even more errors work

This commit is contained in:
rvcas
2022-09-19 01:05:33 -04:00
parent 9bab3187b1
commit 6c34c9be19
4 changed files with 54 additions and 51 deletions

View File

@@ -7,9 +7,13 @@ pub enum Error {
#[error("Only shelley reward addresses can be a part of withdrawals")]
BadWithdrawalAddress,
#[error("{0}")]
FlatDecode(#[from] flat_rs::de::Error),
#[error("{0}")]
FragmentDecode(#[from] pallas_primitives::Error),
#[error("{0}")]
Machine(#[from] machine::Error),
#[error("Native script can't be executed in phase-two")]
NativeScriptPhaseTwo,
#[error("Can't eval without redeemers")]
NoRedeemers,
#[error("Mismatch in required redeemers: {} {}", .missing.join(" "), .extra.join(" "))]
@@ -21,6 +25,10 @@ pub enum Error {
ResolvedInputNotFound,
#[error("A key hash cannot be the hash of a script")]
ScriptKeyHash,
#[error("PlutusV1 cost model not found.")]
V1CostModelNotFound,
#[error("PlutusV2 cost model not found.")]
V2CostModelNotFound,
#[error("Wrong era, Please use Babbage or Alonzo: {0}")]
WrongEra(#[from] pallas_codec::minicbor::decode::Error),
}