Fix up wasm runtime.

This commit is contained in:
Gav
2018-01-16 18:56:57 +01:00
parent b62a8f9587
commit dc6ebf71cf
12 changed files with 45 additions and 28 deletions
@@ -68,6 +68,12 @@ pub fn set_storage(_key: &[u8], _value: &[u8]) {
);
}
/// The current relay chain identifier.
pub fn chain_id() -> u64 {
// TODO: fetch from Externalities.
42u64
}
/// Execute the given closure with global function available whose functionality routes into the
/// externalities `ext`. Forwards the value that the closure returns.
pub fn with_externalities<R, F: FnOnce() -> R>(ext: &mut Externalities<Error=NoError>, f: F) -> R {