Change Source.load_content and Source.compute_checksum mutating methods on Source to instead be pure functions derived from the information in Source
NOTE: This is a breaking change, and will require using the Source class slightly differently, including updating it with a new version of itself if you wish to store files in a different way than it may have originally specified. Also note that the content will still fetch itself when requested, but it is not no longer being updated in Source object (see previous note)
Fix a bug with hash type sizes in BIP122 URI
Added a property to verify checksum correctness
Add a Hex type to further validate hex-encoded strings for addresses, blocks, transactions, checksums, and bytecode types
NOTE: This is somewhat a breaking change because now all hex types (except BIP122 URIs) must be prepended w/ 0x (see changes to OpenZeppelin manifest). Should be interoperable as long as you purge any cached manifests.
fixes: #16
fixes" #18
How I did it
Heavier use of Pydantic
How to verify it
Validate changes required to ape core
Checklist
[x] Passes all linting checks (pre-commit and CI jobs)
[x] New test cases have been added and are passing
[x] Documentation has been updated
[x] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
algorithm
into a str enum typeSource.load_content
andSource.compute_checksum
mutating methods onSource
to instead be pure functions derived from the information inSource
NOTE: This is a breaking change, and will require using theSource
class slightly differently, including updating it with a new version of itself if you wish to store files in a different way than it may have originally specified. Also note that the content will still fetch itself when requested, but it is not no longer being updated inSource
object (see previous note)Hex
type to further validate hex-encoded strings for addresses, blocks, transactions, checksums, and bytecode types NOTE: This is somewhat a breaking change because now all hex types (except BIP122 URIs) must be prepended w/0x
(see changes to OpenZeppelin manifest). Should be interoperable as long as you purge any cached manifests.fixes: #16 fixes" #18
How I did it
Heavier use of Pydantic
How to verify it
Validate changes required to
ape
coreChecklist