-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set chain ID via BrowserSigner + #137 #131
Set chain ID via BrowserSigner + #137 #131
Conversation
boa/integrations/jupyter/browser.py
Outdated
"rpc", "eth_chainId", timeout_message=RPC_TIMEOUT_MESSAGE | ||
) | ||
|
||
@chain_id.setter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's call this set_chain_id()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm besides one comment
This reverts commit db8f14a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm realizing we also need to patch the env whenever chainid is updated. so maybe this is a good time to introduce BrowserEnv
+inline method since it's only called once
""" | ||
|
||
def __init__(self, address=None): | ||
super().__init__(rpc=BrowserRPC()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit -- BrowserRPC() could have side effects, i'd personally put it on its own line --
rpc = BrowserRPC()
super().__init__(rpc=rpc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks!
Closes #125
Depends on
#124Includes #137
What I did
Set chain ID via BrowserSigner
How I did it
chain_id
to BrowserSigner, with getter and setterHow to verify it
In jupyterlab
Description for the changelog
Allow retrieving and changing chain ID in JupyterLab/Colab via BrowserEnv
Cute Animal Picture