Skip to content
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

added nicknames to envs #266

Merged
merged 9 commits into from
Aug 28, 2024
Merged

Conversation

PatrickAlphaC
Copy link
Contributor

What I did

  • I added the nickname attribute to the Env and NetworkEnv objects.
  • Updated pyproject.toml to have dev-dependencies, so all dependencies can be in a single file, instead of split.

If the dev-dependencies change is nice, I'm happy to update CONTRIBUTING.md documentation as such, and also the rest of the dependency management.

How I did it

self.nickname = "pyevm"

How to verify it

pytest -k test_env_nickname

Description for the changelog

  • Added nickname attribute to Env and NetworkEnv classes

Cute Animal Picture

image

boa/network.py Outdated Show resolved Hide resolved
self.evm = PyEVM(self, fast_mode_enabled, fork_try_prefetch_state)

def set_random_seed(self, seed=None):
self._random = random.Random(seed)

def set_nickname(self, nickname):
Copy link
Member

Choose a reason for hiding this comment

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

when would set_nickname be called?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe you have 2 ZKSync branches and you want to call one zksync-testnet and one zksync-mainnet

Copy link
Member

Choose a reason for hiding this comment

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

yea but it is already set at construction, so i'm not sure why set_nickname would be called after construction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you’re in a Python shell and you setup zksync and called it zksync, but then realized you have 2 zksync chains, you’d have to just make two new ones with new names? Feels awkward to then have 3.

  • zksync
  • Zksync testnet
  • Zksync mainnet

Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

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

please roll back the requirements / dev-dependencies changes, they are out of scope here

boa/network.py Outdated Show resolved Hide resolved
@charles-cooper charles-cooper merged commit 8d1e36d into vyperlang:master Aug 28, 2024
9 checks passed
Leminkay pushed a commit to Leminkay/titanoboa that referenced this pull request Oct 28, 2024
I added the nickname attribute to the Env and NetworkEnv objects.

* added nicknames to envs
* fix url masking

---------

Co-authored-by: Charles Cooper <[email protected]>
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