Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const web3 = new Web3(providerAddress);
- const myContract = new web3.eth.Contract(abi, contractAddress);
- let validate = myContract.methods.validateAuthentication(accountAddress,'data',1).call();
- validate.then(res=>{
- console.log('res',res) //returns false, successfully
- })
- let event1 = myContract.methods.getMoreTokens().send({from:accountAddress});
- event1.then(res=>{
- //does not reach here
- })
- Unhandled rejection Error: Returned error: The method eth_sendTransaction does not exist/is not available
- at Object.ErrorResponse (/node_modules/web3-core-helpers/src/errors.js:29:16)
- at Object.<anonymous> (/node_modules/web3-core-requestmanager/src/index.js:137:36)
- at /node_modules/web3-providers-ws/src/index.js:76:44
- at Array.forEach (<anonymous>)
- at W3CWebSocket.WebsocketProvider.connection.onmessage (/node_modules/web3-providers-ws/src/index.js:53:36)
- at W3CWebSocket._dispatchEvent [as dispatchEvent] (/node_modules/yaeti/lib/EventTarget.js:107:17)
- at W3CWebSocket.onMessage (/node_modules/websocket/lib/W3CWebSocket.js:234:14)
- at WebSocketConnection.<anonymous> (/node_modules/websocket/lib/W3CWebSocket.js:205:19)
- at emitOne (events.js:116:13)
- at WebSocketConnection.emit (events.js:211:7)
- at WebSocketConnection.processFrame (/node_modules/websocket/lib/WebSocketConnection.js:547:26)
- at /node_modules/websocket/lib/WebSocketConnection.js:321:40
- at _combinedTickCallback (internal/process/next_tick.js:131:7)
- at process._tickCallback (internal/process/next_tick.js:180:9)
Add Comment
Please, Sign In to add comment