git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 2c04524fc8e9b757c060e0e2cf80d26d6d411e57

correctly initial the WASM module

wanderer committed on 7/13/2016, 3:18:25 PM
Parent: 69d908b662b364266978220167a30f9800f3102c

Files changed

README.mdchanged
index.jschanged
README.mdView
@@ -1,5 +1,5 @@
1-# SYNOPSIS
1+# SYNOPSIS - WIP
22 [![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs-lib) or #ethereumjs on freenode
33
44 [![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
55
index.jsView
@@ -20,24 +20,27 @@
2020
2121 // handles running code.
2222 static codeHandler (code, environment) {
2323 const ethInterface = new Interface(environment)
24- const instance = Wasm.instantiateModule(code, ethInterface)
24+ const instance = Wasm.instantiateModule(code, {
25+ 'ethereum': ethInterface
26+ })
2527 ethInterface.setModule(ethInterface)
2628 return instance
2729 }
2830
2931 // loads code from the merkle trie and delegates the message
30- static call (path, data, environment) {
32+ // Detects if the code injection is needed
33+ static callHandler (path, data, environment) {
3134 // const instance = Wasm.instantiateModule(code, interface)
3235 // interface.setModule(instance)
3336 // return instance
3437 }
3538
3639 // run tx
3740 runTx (tx, environment) {
3841 // verify tx then send to call Handler
39- this.call(tx, environment)
42+ this.callHandler(tx, environment)
4043 }
4144
4245 // run block
4346 runBlock (block, environment) {

Built with git-ssb-web