pub enum Failure {
Show 42 variants
ContractChainNetMismatch(ChainNet),
ResolverChainNetMismatch(ChainNet),
SchemaMismatch {
expected: SchemaId,
actual: SchemaId,
},
TypeSystemMismatch(SemId, Box<Option<Ty<SemId>>>, Box<Ty<SemId>>),
SchemaGlobalSemIdUnknown(GlobalStateType, SemId),
SchemaOwnedSemIdUnknown(AssignmentType, SemId),
SchemaMetaSemIdUnknown(MetaType, SemId),
SchemaOpEmptyInputs(OpFullType),
SchemaOpMetaTypeUnknown(OpFullType, MetaType),
SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType),
SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType),
SchemaUnknownTransitionType(OpId, TransitionType),
SchemaUnknownMetaType(OpId, MetaType),
SchemaUnknownGlobalStateType(OpId, GlobalStateType),
SchemaUnknownAssignmentType(OpId, AssignmentType),
SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy),
SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch),
SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24),
SchemaNoMetadata(OpId, MetaType),
SchemaInvalidMetadata(OpId, SemId),
SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId),
SchemaInvalidOwnedValue(OpId, AssignmentType, SemId),
SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch),
SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch),
CyclicGraph(Opout),
ContractMismatch(OpId, ContractId),
TransitionIdMismatch(OpId, OpId),
WitnessMissingInput(BundleId, OutPoint, Txid),
InputMapTransitionMismatch(BundleId, OpId, Opout),
NoPrevState(OpId, Opout),
SealNoPubWitness(BundleId, Txid),
SealsInvalid(BundleId, Txid, String),
MpcInvalid(BundleId, Txid, Box<InvalidProof>),
NoDbcOutput(Txid),
InvalidProofType(Txid, Method),
StateTypeMismatch {
opid: OpId,
state_type: AssignmentType,
expected: StateType,
found: StateType,
},
FungibleTypeMismatch {
opid: OpId,
state_type: AssignmentType,
expected: FungibleType,
found: FungibleType,
},
ScriptFailure(OpId, Option<u8>, Option<String>),
ContractStateFilled(OpId),
MissingScript(OpId, LibId),
ScriptIDMismatch(OpId, LibId, LibId),
Custom(String),
}Variants§
ContractChainNetMismatch(ChainNet)
the contract chain-network pair doesn’t match (validator runs in chain_net={0} configuration).
ResolverChainNetMismatch(ChainNet)
the resolver chain-network pair doesn’t match (validator runs in chain_net={0} configuration).
SchemaMismatch
schema {actual} provided for the consignment validation doesn’t match schema {expected} used by the contract. This means that the consignment is invalid.
Fields
TypeSystemMismatch(SemId, Box<Option<Ty<SemId>>>, Box<Ty<SemId>>)
type with sem_id {0} does not match the trusted one {1:?} (found {2})
SchemaGlobalSemIdUnknown(GlobalStateType, SemId)
schema global state #{0} uses semantic data type absent in type library ({1}).
SchemaOwnedSemIdUnknown(AssignmentType, SemId)
schema owned state #{0} uses semantic data type absent in type library ({1}).
SchemaMetaSemIdUnknown(MetaType, SemId)
schema metadata #{0} uses semantic data type absent in type library ({1}).
SchemaOpEmptyInputs(OpFullType)
schema for {0} has zero inputs.
SchemaOpMetaTypeUnknown(OpFullType, MetaType)
schema for {0} references undeclared metadata type {1}.
SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType)
schema for {0} references undeclared global state type {1}.
SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType)
schema for {0} references undeclared owned state type {1}.
SchemaUnknownTransitionType(OpId, TransitionType)
operation {0} uses invalid state transition type {1}.
SchemaUnknownMetaType(OpId, MetaType)
operation {0} uses invalid metadata type {1}.
SchemaUnknownGlobalStateType(OpId, GlobalStateType)
operation {0} uses invalid global state type {1}.
SchemaUnknownAssignmentType(OpId, AssignmentType)
operation {0} uses invalid assignment type {1}.
SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy)
operation {0} uses invalid seal closing strategy {1}.
SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch)
invalid number of global state entries of type {1} in operation {0} - {2}
SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24)
number of global state entries of type {1} in operation {0} exceeds schema-defined maximum for that global state type ({2} vs {3}).
SchemaNoMetadata(OpId, MetaType)
required metadata type {1} is not present in the operation {0}.
SchemaInvalidMetadata(OpId, SemId)
invalid metadata in operation {0} not matching semantic type id {1}.
SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId)
invalid global state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInvalidOwnedValue(OpId, AssignmentType, SemId)
invalid owned state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch)
invalid number of input entries of type {1} in operation {0} - {2}
SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch)
invalid number of assignment entries of type {1} in operation {0} - {2}
CyclicGraph(Opout)
opout {0} is referenced within the history multiple times. RGB contracts allow only direct acyclic graphs.
ContractMismatch(OpId, ContractId)
operation {0} is under a different contract {1}.
TransitionIdMismatch(OpId, OpId)
transition claims ID {0} which differs from the actual one {1}
WitnessMissingInput(BundleId, OutPoint, Txid)
transition bundle {0} references non-existing input {1} in witness {2}.
InputMapTransitionMismatch(BundleId, OpId, Opout)
transition bundle {0} input map does not include operation {1} as the one spending opout {1}.
NoPrevState(OpId, Opout)
transition {0} references previous state {1} that cannot be found.
SealNoPubWitness(BundleId, Txid)
bundle {0} public witness {1} is not known to the resolver.
SealsInvalid(BundleId, Txid, String)
transition bundle {0} doesn’t close seal with the witness {1}. Details: {2}
MpcInvalid(BundleId, Txid, Box<InvalidProof>)
transition bundle {0} is not properly anchored to the witness {1}. Details: {2}
NoDbcOutput(Txid)
witness transaction {0} has no taproot or OP_RETURN output.
InvalidProofType(Txid, Method)
first DBC-compatible output of witness transaction {0} doesn’t match the provided proof type ({1})
StateTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
FungibleTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
ScriptFailure(OpId, Option<u8>, Option<String>)
evaluation of AluVM script for operation {0} has failed with the code {1:?} and message {2:?}.
ContractStateFilled(OpId)
contract state can’t fit more data (at operation id {0}).
MissingScript(OpId, LibId)
operation {0} commits to a missing script {1}.
ScriptIDMismatch(OpId, LibId, LibId)
operation {0} commits to a script which ID {1} doesn’t match the actual one {2}.
Custom(String)
Custom error by external services on top of RGB Consensus.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Failure
impl<'de> Deserialize<'de> for Failure
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Failure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Failure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Failure
impl Serialize for Failure
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Failure
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnwindSafe for Failure
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.