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

fix: cache .get_code() #2480

Merged
merged 13 commits into from
Jan 28, 2025
Merged

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Jan 27, 2025

What I did

Caches code, which is easier to do now that selfdestructs don't matter.
So there are a couples times when not to cache however such as during dev because of chain isolation and also when specifying block_id= because you likely are checking for contract creation at a certain time.

caching happens at the chain manager level, which is a familiar pattern.
The provider always checks the RPC, as should be its job.

fixes: #482

How I did it

How to verify it

Checklist

  • All changes are completed
  • Change is covered in tests
  • Documentation is complete

@antazoey antazoey changed the title fix: delete unneeded get_code() call fix: cache .get_code() Jan 27, 2025
@antazoey antazoey force-pushed the fix/delete-unneeded-get-code branch from 0b23dcb to 706350e Compare January 27, 2025 22:39
@antazoey antazoey merged commit 9b4184d into ApeWorX:main Jan 28, 2025
18 checks passed
@antazoey antazoey deleted the fix/delete-unneeded-get-code branch January 28, 2025 20:10
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.

Cache get_code requests
2 participants