Skip to content

Conversation

@chrismaree
Copy link
Member

No description provided.

chrismaree and others added 11 commits March 4, 2022 17:02
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
l2GatewayRouter = await createFake("L2GatewayRouter");

arbitrumSpokePool = await (
await getContractFactory("Arbitrum_SpokePool", { signer: owner })
Copy link
Member Author

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) {
Copy link
Member Author

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.

@chrismaree chrismaree changed the title Chrismaree/build for release build for release, including exporting artefacts and fixtures Mar 7, 2022
@chrismaree chrismaree requested review from mrice32 and nicholaspai and removed request for mrice32 March 7, 2022 21:28
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Copy link
Contributor

@mrice32 mrice32 left a 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);
Copy link
Contributor

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);
Copy link
Contributor

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.

Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Signed-off-by: chrismaree <christopher.maree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants