How can I estimate the gas I need for a string which may be quite long?
I've found an example here, but in this estimate, it doesn't include any custom data.
In my app I would like to save a string on-chain, though the estimateGas's data property appears to require the bytecode for the contract.
How would I go about dealing with this?
contract.method.estimateGas(arg, object)works great, thanks! I guess withweb3.eth.estimateGas, you need the contract's bytecode which you may not have access to, unless you can get that dynamically? (sorry newb) – joe Jan 09 '18 at 23:33datafield, which is much easier if you know the contract's ABI, which describes the public methods and their arguments. – user19510 Jan 09 '18 at 23:35