You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var web3Provider = new HookedWeb3Provider({
host: "https://ropsten.infura.io/v3/",
transaction_signer: global_keystore
});
web3.setProvider(web3Provider);
Send Transaction code
var fromAddr = '0x669dd6157cc2f15ba0b5d0524fe8abd335f5413e';
var toAddr = '0x15007ed8ef6916b2180fdb55d8d45e4f9993f3b2';
var valueEth = '0.01';
var value = parseFloat(valueEth) * 1.0e18
var gasPrice = 18000000000
var gas = 50000
web3.eth.sendTransaction({ from: fromAddr, to: toAddr, value: value, gasPrice: gasPrice, gas: gas }, function(err, txhash) {
console.log('error: ' + err)
console.log('txhash: ' + txhash)
})
We have used this code with web3 and using sendTransaction function getting this type of error..
Error
TypeError: Cannot read property 'hasAddress' of undefined
at HookedWeb3Provider.rewritePayloads (D:\wamp64\www\web3js\node_modules\hooked-web3-provider\build\hooked-web3-provider.js:128:33)
at HookedWeb3Provider.sendAsync (D:\wamp64\www\web3js\node_modules\hooked-web3-provider\build\hooked-web3-provider.js:96:14)
at RequestManager.send (D:\wamp64\www\web3js\node_modules\web3-core-requestmanager\src\index.js:132:66)
at sendRequest (D:\wamp64\www\web3js\node_modules\web3-core-method\src\index.js:562:42)
at Eth.send [as sendTransaction] (D:\wamp64\www\web3js\node_modules\web3-core-method\src\index.js:583:13)
at D:\wamp64\www\web3js\server.js:132:14
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\wamp64\www\web3js\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:335:12)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:275:10)
at module.exports (D:\wamp64\www\web3js\node_modules\express-ejs-layouts\lib\express-layouts.js:116:3)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:317:13)
at D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:335:12)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:275:10)
at urlencodedParser (D:\wamp64\www\web3js\node_modules\body-parser\lib\types\urlencoded.js:91:7)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:317:13)
Please Help me..
The text was updated successfully, but these errors were encountered:
prajit21
changed the title
Provider is invalide
Provider is invalid
Jul 21, 2018
Hello,
Code
var web3Provider = new HookedWeb3Provider({
host: "https://ropsten.infura.io/v3/",
transaction_signer: global_keystore
});
web3.setProvider(web3Provider);
Send Transaction code
var fromAddr = '0x669dd6157cc2f15ba0b5d0524fe8abd335f5413e';
var toAddr = '0x15007ed8ef6916b2180fdb55d8d45e4f9993f3b2';
var valueEth = '0.01';
var value = parseFloat(valueEth) * 1.0e18
var gasPrice = 18000000000
var gas = 50000
web3.eth.sendTransaction({ from: fromAddr, to: toAddr, value: value, gasPrice: gasPrice, gas: gas }, function(err, txhash) {
console.log('error: ' + err)
console.log('txhash: ' + txhash)
})
We have used this code with web3 and using sendTransaction function getting this type of error..
Error
TypeError: Cannot read property 'hasAddress' of undefined
at HookedWeb3Provider.rewritePayloads (D:\wamp64\www\web3js\node_modules\hooked-web3-provider\build\hooked-web3-provider.js:128:33)
at HookedWeb3Provider.sendAsync (D:\wamp64\www\web3js\node_modules\hooked-web3-provider\build\hooked-web3-provider.js:96:14)
at RequestManager.send (D:\wamp64\www\web3js\node_modules\web3-core-requestmanager\src\index.js:132:66)
at sendRequest (D:\wamp64\www\web3js\node_modules\web3-core-method\src\index.js:562:42)
at Eth.send [as sendTransaction] (D:\wamp64\www\web3js\node_modules\web3-core-method\src\index.js:583:13)
at D:\wamp64\www\web3js\server.js:132:14
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\wamp64\www\web3js\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:335:12)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:275:10)
at module.exports (D:\wamp64\www\web3js\node_modules\express-ejs-layouts\lib\express-layouts.js:116:3)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:317:13)
at D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:335:12)
at next (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:275:10)
at urlencodedParser (D:\wamp64\www\web3js\node_modules\body-parser\lib\types\urlencoded.js:91:7)
at Layer.handle [as handle_request] (D:\wamp64\www\web3js\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\wamp64\www\web3js\node_modules\express\lib\router\index.js:317:13)
Please Help me..
The text was updated successfully, but these errors were encountered: