Skip to content

Commit

Permalink
fixed back fork test
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Aug 21, 2023
1 parent e70b377 commit 7e5220b
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions package/preminter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { describe, it, beforeEach, expect } from "vitest";
import { parseEther } from "viem";
import {
zoraCreator1155PremintExecutorABI as preminterAbi,
zoraCreator1155PremintExecutorAddress,
zoraCreator1155ImplABI,
zoraCreator1155FactoryImplAddress,
zoraCreator1155FactoryImplConfig,
Expand Down Expand Up @@ -211,15 +212,16 @@ describe("ZoraCreator1155Preminter", () => {

ctx.preminterAddress = preminterAddress;
}, 20 * 1000);

it<TestContext>(
"can sign for another chain",
async ({ preminterAddress: preminterAddress, fixedPriceMinterAddress }) => {
"can sign on the forked premint contract",
async ({ fixedPriceMinterAddress, forkedChainId }) => {
const premintConfig = defaultPremintConfig(fixedPriceMinterAddress);
const contractConfig = defaultContractConfig({
contractAdmin: creatorAccount,
});

const preminterAddress = zoraCreator1155PremintExecutorAddress[forkedChainId as keyof typeof zoraCreator1155PremintExecutorAddress] as Address;

const contractAddress = await publicClient.readContract({
abi: preminterAbi,
address: preminterAddress,
Expand All @@ -239,14 +241,10 @@ describe("ZoraCreator1155Preminter", () => {
console.log({
creatorAccount,
signedMessage,
contractConfig,
premintConfig,
contractAddress: await publicClient.readContract({
abi: preminterAbi,
address: preminterAddress,
functionName: "getContractAddress",
args: [contractConfig],
}),
});
contractAddress
});
},
20 * 1000
);
Expand Down Expand Up @@ -293,7 +291,6 @@ describe("ZoraCreator1155Preminter", () => {

20 * 1000
);

it<TestContext>(
"can sign and mint multiple tokens",
async ({
Expand Down Expand Up @@ -473,4 +470,5 @@ describe("ZoraCreator1155Preminter", () => {
// 10 second timeout
40 * 1000
);

});

0 comments on commit 7e5220b

Please sign in to comment.