-
Notifications
You must be signed in to change notification settings - Fork 75
build for release, including exporting artefacts and fixtures #74
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
Conversation
| l2GatewayRouter = await createFake("L2GatewayRouter"); | ||
|
|
||
| arbitrumSpokePool = await ( | ||
| await getContractFactory("Arbitrum_SpokePool", { signer: owner }) |
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.
this syntax was actually redundant all over the place and can be removed without impacting anything.
| } | ||
|
|
||
| // Fetch the artifact from the publish package's artifacts directory. | ||
| function getLocalArtifact(contractName: string) { |
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.
this method enables the util to find artefacts when run from node modules.
mrice32
left a comment
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.
LGTM!
| // from node modules which breaks using the hardhat getContractFactory function. | ||
| try { | ||
| const localArtifact = getLocalArtifact(name); | ||
| return new ContractFactory(localArtifact.abi, localArtifact.bytecode, signerOrFactoryOptions as Signer); |
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.
So basically this won't work with libraries?
| // Fetch the artifact from the publish package's artifacts directory. | ||
| function getLocalArtifact(contractName: string) { | ||
| const artifactsPath = `${__dirname}/../../artifacts/contracts`; | ||
| return findArtifactFromPath(contractName, artifactsPath); |
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.
This might be a bit inefficient, but we could always add caching later to speed things up.
No description provided.