Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider is invalid #15

Open
prajit21 opened this issue Jul 21, 2018 · 0 comments
Open

Provider is invalid #15

prajit21 opened this issue Jul 21, 2018 · 0 comments

Comments

@prajit21
Copy link

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..

@prajit21 prajit21 changed the title Provider is invalide Provider is invalid Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant