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

feat: support block id for provider get_code() [APE-1203] #1547

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

antazoey
Copy link
Member

What I did

fixes: #1540

How I did it

  • add missing support
  • add block id alias

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@vany365 vany365 changed the title feat: block id feat: block id [APE-1203] Jul 18, 2023
@antazoey antazoey changed the title feat: block id [APE-1203] feat: support block id for provider get_code() [APE-1203] Jul 18, 2023
@antazoey antazoey requested a review from fubuloubu July 18, 2023 19:51
@@ -200,12 +200,13 @@ def get_balance(self, address: AddressType) -> int:
"""

@abstractmethod
def get_code(self, address: AddressType) -> ContractCode:
def get_code(self, address: AddressType, **kwargs) -> ContractCode:
Copy link
Member Author

Choose a reason for hiding this comment

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

so i made sure, we are allowed to add **kwargs to abstract methods without it breaking the plugins that override and dont yet have it

Copy link
Member

@fubuloubu fubuloubu left a comment

Choose a reason for hiding this comment

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

Works for now. I was actually hoping to make it an explicit kwarg to use in that method via block_id but that can come at a breaking change

@antazoey antazoey merged commit 5fb3edf into ApeWorX:main Jul 18, 2023
@antazoey antazoey deleted the feat/get-code-block-id branch July 18, 2023 22:04
@antazoey
Copy link
Member Author

Works for now. I was actually hoping to make it an explicit kwarg to use in that method via block_id but that can come at a breaking change

If you want this in 0.7, make sure it is in the 0.7 project (or tag, i forget) on linear and itll for sure get in.

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.

Allow specifying block_id= for RPC methods that support it [APE-1188]
2 participants