Just wondering: is there any way to invoke Pudding's promisify abstraction of .call() for contract function, in which the defaultBlock optional parameter is specified?
The web3 Javascript API equivalent for contract .call() is here:
https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methods
It seems in Pudding's implementation of Utils.promisifyFunction():
args.push(tx_params, callback);
The contract function arguments list is manipulated in such a way that the last 2 arguments will always be the Transaction object (tx_params), then the callback.
allows specifying the optional defaultBlock parameter after the Transaction object. Therefore, invoking Pudding's promisified .call() may not work as expected; because in such case, another tx_params will be appended to the argument list, then the callback.
Just wondering: is there any way to invoke Pudding's promisify abstraction of
.call()
for contract function, in which thedefaultBlock
optional parameter is specified? The web3 Javascript API equivalent for contract.call()
is here: https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methodsIt seems in Pudding's implementation of
Utils.promisifyFunction()
:The contract function arguments list is manipulated in such a way that the last 2 arguments will always be the Transaction object (
tx_params
), then the callback.However, in Web3:
allows specifying the optional
defaultBlock
parameter after the Transaction object. Therefore, invoking Pudding's promisified.call()
may not work as expected; because in such case, anothertx_params
will be appended to the argument list, then the callback.