Hot answers tagged

1

You required web3 module but used a method of truffle-contract module while you didn't require it. So, you just can use all methods that web3 provides to you. The command: var theContract=contract_object.new({ from: address, data:contract_byteCode, gas: gasEstimate+10000}) uses truffle-contract module's method. Just replace that with the below command that ...


1

With the JavaScript code you provided in the question, you just can define the given contract. You need to use another method of web3 that executes a solidity function. For executing a solidity function with web3 methods you should try a command like this: contract_name.methods.function_name(<arguments ...>).send({from:<sender address>, value:<...


1

To see a contract's values in browser with web3, you should create some .jade file. For interacting with a smart contract from a browser, the workflow is this: There are 3 levels: 1) Blockchain level, 2) Nodejs level, and 3) UI/browser level. In "blockchain level" there is the given smart contract (that you have it). In "Nodejs level" ...


Only top voted, non community-wiki answers of a minimum length are eligible