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

Don't memoize eth client TransactOpts #105

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Dec 5, 2023

Why are these changes needed?

I think memoizing TransactOpts is potentially dangerous pattern as it's trivial to update the memoized TransactOpts and the caller needs to remember not to.
Since generating TransactOpts isn't too expensive, generating new TransactOpts each time can prevent such scenario.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@ian-shim ian-shim marked this pull request as ready for review December 5, 2023 00:37
Copy link
Collaborator

@mooselumph mooselumph left a comment

Choose a reason for hiding this comment

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

lgtm

@ian-shim ian-shim merged commit 2ca8907 into Layr-Labs:master Dec 13, 2023
4 checks passed
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