-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix(cli): fix verify with sourcify for dependencies #2750
Conversation
🦋 Changeset detectedLatest commit: 55c8f21 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
verify
, include solidity-files-cache.json and foundry.toml npm// If the verifier is Sourcify, attempt to verify MUD core contracts | ||
// There are path issues with verifying Blockscout and Etherscan | ||
if (verifier === "sourcify") { | ||
// Install subdependencies so contracts can compile |
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.
it's less about compiling and more about the dependent files existing in node_modules right?
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.
well, the files have to exist in node_modules to be compiled
mud verify
attempts to verify external contracts (InitModule
,World
, etc.) by changing the working directory to the relevant dependency (eg.cd node_module@latticexyz/world
) and runningforge verify-contract
.However these dependencies on NPM are incomplete, causing issues when attempting to compile the source files:
solidity-files-cache.json
, Forge cannot locate the contract by name alone (eg.World
), and requires the full path. We fix this by publishing the cache on NPM.world.sol
importsschema-type
,world.sol
cannot be compiled. We fix this by runningnpm install
in each dependency during verification.