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

Get rid of the Context #85

Open
jpcenteno opened this issue Jun 9, 2022 · 0 comments
Open

Get rid of the Context #85

jpcenteno opened this issue Jun 9, 2022 · 0 comments

Comments

@jpcenteno
Copy link
Contributor

  • The design of EthClient is built around the reading and writing of the Context module.

Problems that we encountered so far:

  • The Context module acts as a mutable global variable.
  • Editing the context in one livebook notebook modifies the context for the other as they share the same runtime.
  • What if we want to work with multiple accounts or multiple contracts?

Proposed solution

Instead of having functions like EthClient.deploy/2 using the Context state as an implicit input, have them receive a %Client{} structure:

EthClient.deploy(client, bin, abi)

Where the %Client{} structure contains the configuration needed for a specific blockchain network.

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

No branches or pull requests

1 participant