I have the following code (source is the solidity contract to be compiled).
var compiled = web3.eth.compile.solidity(source);
var code = compiled.code;
var abi = compiled.info.abiDefinition;
However compiled.code
and compiled.info.abiDefinition
return undefined. What am I doing wrong?
undefined
gets printed to the console, but the code has still worked; have you checked typingabi
into the console afterwards to check?Uncaught TypeError: Cannot read property 'abiDefinition' of undefined
however if i print in the consoleconsole.log(JSON.stringify(compiled))
it is not undefinedcompiled
?