Merge pull request #559 from ethereum/enhanceWeb3provider

add util function to web3vm provider
pull/7/head
yann300 7 years ago committed by GitHub
commit 891ccb07e8
  1. 18
      src/web3Provider/web3VmProvider.js

@ -31,15 +31,15 @@ function web3VmProvider () {
this.storageCache = {} this.storageCache = {}
this.sha3Preimages = {} this.sha3Preimages = {}
// util // util
this.sha3 = function () { return web3.sha3.apply(web3, arguments) } this.sha3 = function () { return self.web3.sha3.apply(web3, arguments) }
this.toHex = function () { return web3.toHex.apply(web3, arguments) } this.toHex = function () { return self.web3.toHex.apply(web3, arguments) }
this.toAscii = function () { return web3.toAscii.apply(web3, arguments) } this.toAscii = function () { return self.web3.toAscii.apply(web3, arguments) }
this.fromAscii = function () { return web3.fromAscii.apply(web3, arguments) } this.fromAscii = function () { return self.web3.fromAscii.apply(web3, arguments) }
this.fromDecimal = function () { return web3.fromDecimal.apply(web3, arguments) } this.fromDecimal = function () { return self.web3.fromDecimal.apply(web3, arguments) }
this.fromWei = function () { return web3.fromWei.apply(web3, arguments) } this.fromWei = function () { return self.web3.fromWei.apply(web3, arguments) }
this.toWei = function () { return web3.toWei.apply(web3, arguments) } this.toWei = function () { return self.web3.toWei.apply(web3, arguments) }
this.toBigNumber = function () { return web3.toBigNumber.apply(web3, arguments) } this.toBigNumber = function () { return self.web3.toBigNumber.apply(web3, arguments) }
this.isAddress = function () { return web3.isAddress.apply(web3, arguments) } this.isAddress = function () { return self.web3.isAddress.apply(web3, arguments) }
} }
web3VmProvider.prototype.setVM = function (vm) { web3VmProvider.prototype.setVM = function (vm) {

Loading…
Cancel
Save