Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Contract .call() with "defaultBlock" param specified not working #34

Description

@abtr945

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.

However, in Web3:

myContractInstance.myMethod.call(param1 [, param2, ...] [, transactionObject] [, defaultBlock] [, 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions