async function sendTransaction(_from,_to,data,cb, callback){// cb = original callback
	var http = new XMLHttpRequest();
	var url = "http://127.0.0.1:8545";
	gas = await estimateGas(_from,_to,data);
	var params = generate(_from,_to,data,"eth_sendTransaction",gas);
	console.log(params);
	http.open("POST", url, true);

	http.onreadystatechange = function(){callback(http,cb);};
	
	http.send(params);
}
// Send the transaction to the local RPC
Send the transaction to the local RPC
Send the transaction to the local RPC
async function sendTransaction(_from,_to,data,cb, callback){
	var http = new XMLHttpRequest();
	var url = "http://127.0.0.1:8545";
	gas = await estimateGas(_from,_to,data);
	var params = generate(_from,_to,data,"eth_sendTransaction",gas);
	console.log(params);
	http.open("POST", url, true);
	http.onreadystatechange = function(){callback(http,cb);};
	http.send(params);
}
async function sendTransaction ( _from , _to , data , cb , callback ) { var http = new XMLHttpRequest ( ) ; var url = "http://127.0.0.1:8545" ; gas = await estimateGas ( _from , _to , data ) ; var params = generate ( _from , _to , data , "eth_sendTransaction" , gas ) ; console . log ( params ) ; http . open ( "POST" , url , true ) ; http . onreadystatechange = function ( ) { callback ( http , cb ) ; } ; http . send ( params ) ; }
Send the transaction to the local RPC
Send the transaction to the local RPC
// cb = original callback