ethjs-contract icon indicating copy to clipboard operation
ethjs-contract copied to clipboard

ability to pass arguments using an object

Open sulliwane opened this issue 6 years ago • 1 comments

I think web3.js is providing this feature, instead of

mycontract.call(arg1, arg2, arg3, txObject);

allow to pass values using an object:

mycontract.call({ arg1: 'value1', arg2: 'value2', arg3: 'value3' }, txObject);

Input arg names are known from the ABI, so it would be super convenient to support that...

Thanks for your input on this!

sulliwane avatar May 07 '18 16:05 sulliwane

So apparently I totally made up the fact that web3.js has implemented this, as nothing mentioned on their doc (https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#id12) :-)

But still, I'd be glad to have your opinion on this feature proposal! Many Thanks

sulliwane avatar May 07 '18 16:05 sulliwane