Struct ReturnsHash
pub struct ReturnsHash
{ /* private fields */ }
Implementations
impl ReturnsHash
pub fn new(hash: Field) -> Self
pub fn get_preimage<T>(self) -> T
where
T: Deserialize
Fetches the underlying return value from an oracle, constraining that it corresponds to the return data hash.
A hash that represents a private contract function call's return value. Call
get_preimageto get the underlying value.The kernels don't process the actual return values but instead their hashes, so it is up to contracts to populate oracles with the preimages of these hashes on return to make them available to their callers.
Public calls don't utilize this mechanism since the AVM does process the full return values.