Skip to content

allow to set an ethereum block number in Web3::Eth::Rpc#2

Open
donpdonp wants to merge 4 commits intoBloxy-info:masterfrom
donpdonp:master
Open

allow to set an ethereum block number in Web3::Eth::Rpc#2
donpdonp wants to merge 4 commits intoBloxy-info:masterfrom
donpdonp:master

Conversation

@donpdonp
Copy link
Copy Markdown

@donpdonp donpdonp commented Dec 14, 2020

This patch sets a variable in Rpc to use a specific block number when calling the web3 service. It can be updated after the Rpc class is built. My use case is I want to look at a contract function return value for a specific block, then see how it has changed in the next block.

WEB3 = Web3::Eth::Rpc.new host: 'mainnet.infura.io', 
                          port: 443,  
                          block: 11453808

also replaces rails try with 'safe navigation' &.

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.

1 participant