I am using following code to generate a new transaction using web3.js & metamask:
var web3dictdata = {
gasPrice: web3.toHex(10),
gasLimit: web3.toHex(210000),
to: "0x92EB887e5de9f2C73C08483831F47dc0CD8f7B0c",
value: web3.toWei(0.01, "ether"),
}
web3dictdata.data = "0x7770334469734b58777148446a4d4f5177345f4370634b59777154436e634f52777148436e4d4b56777076446b4d4b657770374372384b66777072446b634b657771544371734b5877345f436f734f4a77706e436d634f5477707a446a384f4e";
web3.eth.sendTransaction(web3dictdata, function(error, receipt) {
if (error)
{
console.log(error);
} else {
console.log(receipt)
}
});
But whenever I am launching it, it ends up in generating a new transaction filled with the data, 'to' address along with the value of a transaction. The missing points are:
- gasPrice
- gasLimit
User, in order to successfully send a transaction, has to fill the gas Price on his own, which totally destroys my vision of the application
Screenshots: