ethpm / py-ethpm

This library is deprecated. ethPM python tooling is now located in web3.py
MIT License
24 stars 13 forks source link

Add `needs_bytecode_linking` to `LinkableContract` #104

Closed njgheorghita closed 5 years ago

njgheorghita commented 5 years ago

What was wrong?

Handling link references strategy was insufficient for pre-linked contract factories.

This is needed for the linker strategy introduced to pytest-ethereum [here]().

How was it fixed?

Replaced Contract.has_linkable_bytecode and Contract.is_bytecode_linked with Contract.needs_bytecode_linking that will automatically detect if a contract's link references are already linked.

some thoughts on possible improvements...

Cute Animal Picture

image

pipermerriam commented 5 years ago

support partially pre-linked contract factories (right now every link-ref has to be unlinked, otherwise we assume that the factory is entirely linked.

This one seems necessary (but not necessarily for this PR)