- I send the transaction from my javascript
- Metamask open the transfer-dialog
- i confirm
i get an error message in metamask (inpage.js:1 MetaMask - RPC Error: Error: Error: [ethjs-rpc] rpc error with payload {"id":3801695059583,"jsonrpc":"2.0","params":["0xf8ac098504a817c80082753094bd212f85764be5ecdb5d0ca44ed46ac866b352c781c8b844d0679d3400000000000000000000000058f9015d8b36eacbd4d105cb79872992c073583f0000000000000000000000000000000000000000000000000000000000000000822d45a028d2355a1149fac93070742fc4e14213f441d4a8dfd97611b4de238f1ef70ffaa048f0eed65a9c495ce42229d569d156a7ff4cc206efced1f25e1c779c53f24485"],"method":"eth_sendRawTransaction"} Error: VM Exception while processing transaction: revert )
i reset the transaction history for the account in metamask-setting
**Information about the accounts in my html ************************* Coin: (obj/adr/data):[object Object]/0xBd212f85764Be5ecDB5d0ca44ed46AC866B352c7/undefined CoinContract: (obj/adr/data):[object Object]/undefined/undefined Coin anzeigen Minter: 0x6d8c98f8eb01f8f7ee55d25bf01e30fa64333940 Coin erzeugen Account1 0x6d8C98f8eb01F8f7ee55D25Bf01e30Fa64333940 Saldo1 65764158165999998600 Amount: 0.37 Coin senden Account2 0x58f9015d8B36EAcBD4d105CB79872992C073583F Saldo2 30997031680000000000 Amount: 0.37 Coin senden Account3 0xBd212f85764Be5ecDB5d0ca44ed46AC866B352c7 Saldo3 0 Amount: 0.37
************Calling the transaktion from container.js**************
function CoinSenden (data,adressat) {
console.log("Coin senden: " + adressat);
try {
//
// Code für ändern ????
//
var param1=data.amount;
var myContract = web3.eth.contract(CoinABI);
var myContractInstance = myContract.at(CoinContractADR);
console.log("contract/contractinstanz:" + myContract + "/" + myContractInstance);
console.log("contract/contractinstanz:" + myContract.address + "/" + myContractInstance.address);
console.log("para:" + param1 + "/" + "adr:" + ContainerAccount2);
myContractInstance.send(
ContainerAccount2,param1,
{from : ContainerAccount2, value: 200, gas: 30000, gasPriceInWei : 1000},
function(err, myContract){
if(!err) {
// NOTE: The callback will fire twice!
// Once the contract has the transactionHash property set and once its deployed on an address.
// e.g. check tx hash on the first call (transaction send)
if(!myContract.address) {
console.log("Phase1- " + myContract.transactionHash) // The hash of the transaction, which deploys the contract
// check address on the second call (contract deployed)
} else {
console.log("Phase2- " + myContract.address) // the contract address
}
// Note that the returned "myContractReturned" === "myContract",
// so the returned "myContractReturned" object will also get the address set.
}
else {
console.log("Fehler in der Methode beim Coin senden: " + err);
}
});
console.log("Coin senden fertig.")
} catch (err) {
console.log("Fehler beim Coin senden: " + err);
}
}
well, not to much. I want to see that it is working : 1. the committed transaction in ganache 2. the new balance for the accounts