From aa4600fa4bba4c9377f54f340d5b9aa8076dc214 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 28 Aug 2017 11:43:52 +0200 Subject: [PATCH] add util function to web3vm provider --- src/web3Provider/web3VmProvider.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/web3Provider/web3VmProvider.js b/src/web3Provider/web3VmProvider.js index 6e5db82843..548d227f26 100644 --- a/src/web3Provider/web3VmProvider.js +++ b/src/web3Provider/web3VmProvider.js @@ -31,15 +31,15 @@ function web3VmProvider () { this.storageCache = {} this.sha3Preimages = {} // util - this.sha3 = function () { return web3.sha3.apply(web3, arguments) } - this.toHex = function () { return web3.toHex.apply(web3, arguments) } - this.toAscii = function () { return web3.toAscii.apply(web3, arguments) } - this.fromAscii = function () { return web3.fromAscii.apply(web3, arguments) } - this.fromDecimal = function () { return web3.fromDecimal.apply(web3, arguments) } - this.fromWei = function () { return web3.fromWei.apply(web3, arguments) } - this.toWei = function () { return web3.toWei.apply(web3, arguments) } - this.toBigNumber = function () { return web3.toBigNumber.apply(web3, arguments) } - this.isAddress = function () { return web3.isAddress.apply(web3, arguments) } + this.sha3 = function () { return self.web3.sha3.apply(web3, arguments) } + this.toHex = function () { return self.web3.toHex.apply(web3, arguments) } + this.toAscii = function () { return self.web3.toAscii.apply(web3, arguments) } + this.fromAscii = function () { return self.web3.fromAscii.apply(web3, arguments) } + this.fromDecimal = function () { return self.web3.fromDecimal.apply(web3, arguments) } + this.fromWei = function () { return self.web3.fromWei.apply(web3, arguments) } + this.toWei = function () { return self.web3.toWei.apply(web3, arguments) } + this.toBigNumber = function () { return self.web3.toBigNumber.apply(web3, arguments) } + this.isAddress = function () { return self.web3.isAddress.apply(web3, arguments) } } web3VmProvider.prototype.setVM = function (vm) {