mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 18:11:03 +00:00
contracts: Change define_env! to expect a Result<T, DispatchError> for every function (#7762)
* Make host functions return TrapReason This avoids the need to manually store any trap reasons to the `Runtime` from the host function. This adds the following benefits: * It properly composes with the upcoming chain extensions * Missing to set a trap value is now a compile error * review: Remove superflous .into()
This commit is contained in:
committed by
GitHub
parent
dd8e7587cb
commit
ab876be9e9
@@ -378,6 +378,14 @@ decl_error! {
|
||||
/// on the call stack. Those actions are contract self destruction and restoration
|
||||
/// of a tombstone.
|
||||
ReentranceDenied,
|
||||
/// `seal_input` was called twice from the same contract execution context.
|
||||
InputAlreadyRead,
|
||||
/// The subject passed to `seal_random` exceeds the limit.
|
||||
RandomSubjectTooLong,
|
||||
/// The amount of topics passed to `seal_deposit_events` exceeds the limit.
|
||||
TooManyTopics,
|
||||
/// The topics passed to `seal_deposit_events` contains at least one duplicate.
|
||||
DuplicateTopics,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user