From f90e4ea7c6e0dc75319d17cda4ef6d4d7e7024db 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/web3Provider/web3VmProvider.js b/src/web3Provider/web3VmProvider.js index df4b8228cf..6e5db82843 100644 --- a/src/web3Provider/web3VmProvider.js +++ b/src/web3Provider/web3VmProvider.js @@ -30,6 +30,16 @@ function web3VmProvider () { this.currentProvider = {'host': 'vm provider'} 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) } } web3VmProvider.prototype.setVM = function (vm) {