Skip to content

Support call functions at block number#17

Open
vinhnd2010 wants to merge 1 commit intoizetex:masterfrom
vinhnd2010:support-call-function-at-block-number
Open

Support call functions at block number#17
vinhnd2010 wants to merge 1 commit intoizetex:masterfrom
vinhnd2010:support-call-function-at-block-number

Conversation

@vinhnd2010
Copy link
Copy Markdown

Pass BlockNumber value at the last of params list.
Ex:

# creation of contract object
myContract = web3.eth.contract(abi);

# initiate contract for an address
myContractInstance = myContract.at('0x2ad180cbaffbc97237f572148fc1b283b68d8861');

# call constant function at block_number
result = myContractInstance.balanceOf([address], [block_number]); 
puts result 

@vinhnd2010
Copy link
Copy Markdown
Author

vinhnd2010 commented Jun 21, 2018

@astudnev Please have a look. This PR solves the issue #16.
Thanks!

Copy link
Copy Markdown
Contributor

@astudnev astudnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not mix args and options of call.
Please make a separate optional parameter, otherwise we will have a conflict in args with options

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants