when i try to run the ratings contract on mix (ethereum v0.9.92) windows 64bit. I'm getting this error thrown. It was working until a couple versions prior to this. can anyone help me find the problem. the contract/html code is exact from the tutorial
here
Comments
You have to the set the defaultAccount to be used:
web3.eth.defaultAccount = web3.eth.accounts[0]
My problem: I don't know how to display the JS console to enter the proposed command? I cannot find a corresponding menu point in Mix. Any help would be appreciated!
contract["NAME"].contract.function(param1, param2, { from: "0x...." })
Or inside your html between javascript tags.
It is missing in the sample contract, so it is confusing.
If you input via js console it is in fact a workaround.
open js tag
///////////////////////////////////////////////////////////////////////// HERE IT IS !
web3.eth.defaultAccount = web3.eth.accounts[0];
/////////////////////////////////////////////////////////////////////////
function get() {
var param = document.getElementById('query').value;
var res = contracts['Sample'].contract.get();
document.getElementById('queryres').innerText = res;
}
function set() {
var key = document.getElementById('key').value;
var res = contracts['Sample'].contract.set(key);
}
close js tag