Skip to content
Commit ab876be9 authored by Alexander Theißen's avatar Alexander Theißen Committed by GitHub
Browse files

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()
parent dd8e7587
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment