So assuming the FuncEnv holds tx of type Option<(usize, size>) it should be very easy to add this host function:
svm_tx_range that would return the Memory range holding the binary transaction.
We need to consult Wasmer about whether it's possible to implement that as a single host function.
i.e:
fn txdata(env: &FuncEnv) -> (i32, i32) { ... }
If that won't work then please implement as two separate host functions:
Depends on: #457
So assuming the
FuncEnv
holdstx
of typeOption<(usize, size>)
it should be very easy to add this host function:svm_tx_range
that would return the Memory range holding the binary transaction. We need to consult Wasmer about whether it's possible to implement that as a single host function.i.e:
If that won't work then please implement as two separate host functions:
and
p.s: If the single host function will work please convert the current
calldata_offset
andcalldata_len
into a single host function as well: https://github.com/spacemeshos/svm/blob/6edb73de199fafce0953f82af061ca1090ff911c/crates/runtime/src/vmcalls/calldata.rs#L1-L16