From a67305ed72930cfb733f6c0ed7ae4c0a128b3f2c Mon Sep 17 00:00:00 2001 From: d11e9 Date: Wed, 7 Oct 2015 18:51:46 +0100 Subject: [PATCH] updating to match new EthVm apis --- libs/universal-dapp.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/universal-dapp.js b/libs/universal-dapp.js index b052635e81..2a15fdb8c2 100644 --- a/libs/universal-dapp.js +++ b/libs/universal-dapp.js @@ -7,12 +7,11 @@ function UniversalDApp (contracts, options) { if (!options.vm && web3.currentProvider) { } else if (options.vm) { - this.stateTrie = new EthVm.Trie(); - this.vm = new EthVm.VM(this.stateTrie); + this.vm = new EthVm(); //@todo this does not calculate the gas costs correctly but gets the job done. this.identityCode = 'return { gasUsed: 1, return: opts.data, exception: 1 };'; this.identityAddr = ethUtil.pad(new Buffer('04', 'hex'), 20) - this.vm.loadPrecompiled(this.identityAddr, this.identityCode); + this.vm.loadCompiled(this.identityAddr, this.identityCode); this.secretKey = '3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511' this.publicKey = '0406cc661590d48ee972944b35ad13ff03c7876eae3fd191e8a2f77311b0a3c6613407b5005e63d7d8d76b89d5f900cde691497688bb281e07a5052ff61edebdc0' this.address = ethUtil.pubToAddress(new Buffer(this.publicKey, 'hex'));