Skip to main content
5 events
when toggle format what by license comment
Aug 22, 2018 at 9:47 comment added Abhinav Arora Then in the geth console I am deploying the contract as loadScript(filenam.js) and waiting till the contract gets mined to get the address. After that I am getting contract instance as instance = eth.contract(ABI).at("ADDRESS") For setting a value, instance.set(4123) and waiting for the transaction to get mined. Now after this if I check the value as var v = instance.get() and console.log(v), it shows me the new value. However if I try to read the event as mentioned above , it says :- TypeError: Cannot access member 'args' of undefined at <anonymous>:1:1
Aug 22, 2018 at 9:37 comment added Abhinav Arora For deploying contract, we are using .js file as follows: var interfaceContent = eth.contract(ABI) var byteCode = "0x" + "BYTE_CODE" var c = interfaceContent.new({from:eth.accounts[0],data:byteCode,gas: 4700000}, function(e, contract){ if(e) { console.error(e); return; } if(!contract.address) { console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined..."); } else { console.log("Contract mined! Address: " + contract.address); console.log(contract); } })
Aug 22, 2018 at 6:30 comment added user19510 I was hoping you could compare your code to mine and try to find a difference. If that's not helping, perhaps you can share the rest of your code/methodology. (E.g. share how you're compiling and deploying the code, your calls to set and get, etc. Everything someone would need to replicate your test.)
Aug 22, 2018 at 6:23 comment added Abhinav Arora thanks for the answer. Your code looks pretty close to what I am trying. I still don't know why mine gives the above error.
Aug 22, 2018 at 6:07 history answered user19510 CC BY-SA 4.0