Commit 6fc5e64f authored by Hero Bird's avatar Hero Bird

[pdsl_model] Add ExecutionEnv::return fn

parent 1d9bb5f1
......@@ -24,4 +24,11 @@ impl<State> ExecutionEnv<State> {
pub fn caller(&self) -> Address {
ContractEnv::caller()
}
pub fn r#return<T>(&self, val: T) -> !
where
T: parity_codec::Encode,
{
ContractEnv::return_(&val.encode()[..])
}
}
Markdown is supported
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