Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong?
This PR is a redesign from #3286
Related to #1596, #3036, #3279
How was it fixed?
Added utilities for dealing with ABIs and contract data that do not require a w3 instance.
ABIElement
is a type in web3.py which is composed ofABIFunction
s andABIEvents
. These represent fragments of an ABI which are useful when decoding/encoding contract data. These utilities will make it easier to work with contract logs.The codec is using the default registry which may not be desired. The idea is to eliminate the need to pass in a codec when retrieving event data from a log.
web3._utils.events.get_event_data()
requires a codec, but the newparse_transaction_for_event
is set up with an argument to enablestrict
.I'm not totally sure if this is the correct way to enable
strict
mode for encoding/decoding. Does the codec itself need to be initialized with the proper registry, or is the flag all that is needed?ABI utils tests to be added in
tests/core/abi-utils
.The following methods are now available for the ABI utility API.
Public ABI Utils
Todo:
Cute Animal Picture