-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ethpm v3 #1652
Ethpm v3 #1652
Conversation
ba04247
to
81e61d8
Compare
732b1d3
to
52b8fe8
Compare
bb82277
to
d7ad81c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to check, this is going to intentionally deprecate support for v2 and only support v3?
@pipermerriam Yup, we landed on this a while back b/c it's behind the |
b3ea18e
to
99a97f2
Compare
@pipermerriam @marcgarreau Okey dokey, this turned into a doozy of a pr. But most of the changes are fairly cosmetic, and the majority of files changed are simply removing redundant assets. I'm happy to hop on a call and walk-through the changes. If anybody is uncomfortable with merging this branch directly into master, I'm definitely open to suggestions / alternative approaches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot in there, but I didn't see anything concerning on a "pragmatic" read through.
Edit: don't forget the newsfragment ;)
web3/tools/pytest_ethereum/linker.py
Outdated
@@ -100,10 +100,11 @@ def link(contract: ContractName, linked_type: str, package: Package) -> Package: | |||
"so it is not a valid contract type for link()" | |||
) | |||
linked_factory = unlinked_factory.link_bytecode({linked_type: deployment_address}) | |||
# ??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
|
||
|
||
@pytest.mark.parametrize("version", (1, 2, "1" "3", b"3")) | ||
@pytest.mark.parametrize("version", (2, 3, "2" "3", b"3")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ethpm/3
the only acceptable answer here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And should "2"
and "3"
be separated by a comma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ethpm/3 the only acceptable answer here?
Yup, that's the only valid version string for an ethpm v3 manifest.
ethpm/backends/ipfs.py
Outdated
@@ -154,7 +154,7 @@ def base_uri(self) -> str: | |||
MANIFEST_URIS = { | |||
"ipfs://QmVu9zuza5mkJwwcFdh2SXBugm1oSgZVuEKkph9XLsbUwg": "standard-token", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious why these didn't change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh good catch, well it's because this is just a small cache for the DummyIPFSBackend
and DummyIPFSBackend.fetch_uri_contents()
simply fetches the local asset rather than fetching it from IPFS, so the hash isn't really used in any meaningful way. But, they're all updated now.
What was wrong?
The
ethpm
module andweb3.pm
needed updating to support the latest ethpm version. The most significant changes to an ethpm schema include....package_name
->name
manifest_version
->manifest
compilers
was added as a new top-level fieldname
andversion
are no longer strictly required fieldsHow was it fixed?
We decided to make a hard update from v2 -> v3 (as opposed to deprecating and gradually phasing in v3 support) for reasons mentioned in a comment below.
Todo:
docs.ethpm.com
ethpm/tools
web3.pm
ethpm-spec
Cute Animal Picture