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

Can't create custom network #103

Open
austinabell opened this issue Apr 4, 2022 · 3 comments
Open

Can't create custom network #103

austinabell opened this issue Apr 4, 2022 · 3 comments

Comments

@austinabell
Copy link
Contributor

austinabell commented Apr 4, 2022

Types weren't exported and the API doesn't support creating. #102 moves towards this, but some things are still not accessible.

For example NetworkClient trait required to use things requires returning a Client reference, but there is no way to construct a Client externally.

@ChaoticTempest
Copy link
Member

Good point to mention. Some stuff might not be ready to allow users to construct their own network quite yet (such as the trait for top level account creation not having a good enough API), so was leaving this feature out for now. But definitely a good issue to tackle in the future to allow this

@bharath-123
Copy link

@ChaoticTempest i think what @austinabell suggests is useful because we might want to run our own sandbox and persist state between integration test runs. what do you think?

@ChaoticTempest
Copy link
Member

This issue was more about creating a custom network where we can have custom behavior such as overriding calls into creating accounts via the helper contracts in testnet for instance. But for persisting state between sandbox, we have something like #64 which is currently blocked by how we can kill the sandbox after all tests have passed. You can use that if you need it now, but you'll potentially need to kill the sandbox yourself.

A simple way of getting the workflow you're suggesting (and having workspaces not manage the sandbox), is by specifying some configs in one of the initialization functions of workspaces. Probably an uncommon case to make use of, but could be worthwhile if you see value in wanting to start your own sandbox. Just note that this will end up making workspaces not have full control of sandbox, and then you will be the sole manager of it. This could mean resource leaks if you don't kill the sandbox after you're done with tests

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

No branches or pull requests

3 participants