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

Various Web3 / AsyncWeb3 objects unnecessarily allocated #572

Open
barakman opened this issue Apr 24, 2024 · 0 comments
Open

Various Web3 / AsyncWeb3 objects unnecessarily allocated #572

barakman opened this issue Apr 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@barakman
Copy link
Collaborator

barakman commented Apr 24, 2024

Bug Description

  • There are various Web3 and AsyncWeb3 objects allocated across the code
  • They are mostly identical in their internal configuration, but are nevertheless different instances
  • Other than being wasteful, it could lead to some unpredicted erroneous behavior in the system
  • For example, injecting the middleware (when needed) might be applied only for some of them

General Solution

  • Use a single Web3 object (or possibly two objects, with one of them serving Tenderly in specific)
  • Use a single AsyncWeb3 object (or possibly two objects, with one of them serving Tenderly in specific)
  • Align the related naming convention - either web3 or w3, but not both of these names in different places
@barakman barakman added the bug Something isn't working label Apr 24, 2024
@barakman barakman changed the title Various Web3 / AsyncWeb3 objects unnecessarily allocated throughout the code Various Web3 / AsyncWeb3 objects unnecessarily allocated Apr 24, 2024
@barakman barakman self-assigned this Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant