mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-29 22:09:55 +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:
1 parent
dd8e7587cb
commit
ab876be9e9
5 files changed
+146
-156
No files matched your search
@@ -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