File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ const Web3 = require("web3");
2
2
3
3
const OPTIONS = {
4
4
defaultBlock : "latest" ,
5
- transactionConfirmationBlocks : 3 ,
5
+ transactionConfirmationBlocks : 1 ,
6
6
transactionBlockTimeout : 5
7
7
} ;
8
8
9
9
const web3 = new Web3 (
10
10
new Web3 . providers . WebsocketProvider ( "ws://localhost:8545" ) ,
11
+ // Web3.providers.HtttpProvider("http://localhost:8545")
11
12
null ,
12
13
OPTIONS
13
14
) ;
@@ -38,14 +39,13 @@ async function sendTx() {
38
39
value : web3 . utils . toWei ( "0.1" , "ether" )
39
40
} )
40
41
. on ( "transactionHash" , txHash => {
41
- //web3.currentProvider.send("evm_mine");
42
+ //web3.currentProvider.send("evm_mine"); // execution of it seems to be blocked by sendTransaction in beta52
42
43
console . log ( "on transactionHash" , txHash ) ;
43
44
} )
44
45
. on ( "receipt" , receipt => {
45
46
console . log ( "on receipt" ) ;
46
47
} )
47
48
. on ( "confirmation" , ( confirmationNumber , receipt ) => {
48
- // ganache.advanceBlock(web3); // execution of it seems to be blocked by sendTransaction in beta52
49
49
console . log ( "on confirmation" , confirmationNumber ) ;
50
50
} )
51
51
. on ( "error" , error => {
You can’t perform that action at this time.
0 commit comments