Skip to content

Commit

Permalink
fixed test to use zora chain
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Aug 11, 2023
1 parent bc90597 commit cce5564
Show file tree
Hide file tree
Showing 3 changed files with 562 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"tsup": "^6.7.0",
"viem": "^0.3.49",
"typescript": "^5.0.4",
"viem": "^1.6.0",
"vite": "^4.1.4",
"vitest": "~0.30.1"
},
Expand Down
10 changes: 5 additions & 5 deletions package/batchPublish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
parseEther,
createTestClient,
} from "viem";
import { foundry, mainnet } from "viem/chains";
import { foundry, zora } from "viem/chains";
import { describe, it, expect } from "vitest";
import {
zoraCreator1155FactoryImplConfig,
Expand Down Expand Up @@ -42,11 +42,11 @@ const publicClient = createPublicClient({
type Address = `0x${string}`;

// JSON-RPC Account
const [creatorAccount, ] =
const [creatorAccount, collectorAccount] =
(await walletClient.getAddresses()) as [Address, Address, Address];

const factoryProxyAddress = zoraCreator1155FactoryImplConfig.address[
mainnet.id
zora.id
].toLowerCase() as `0x${string}`;

const AddressZero = "0x0000000000000000000000000000000000000000";
Expand Down Expand Up @@ -247,7 +247,7 @@ describe("ZoraCreator1155Preminter", () => {
// have the factory create the contract
const createContractCall = await walletClient.writeContract({
abi: zoraCreator1155FactoryImplConfig.abi,
address: zoraCreator1155FactoryImplConfig.address[mainnet.id],
address: zoraCreator1155FactoryImplConfig.address[zora.id],
functionName: "createContract",
args: [
contractUri,
Expand Down Expand Up @@ -281,7 +281,7 @@ describe("ZoraCreator1155Preminter", () => {
[collectorAccount]
);

const zoraMintFee = chainConfigs[mainnet.id].MINT_FEE_AMOUNT;
const zoraMintFee = chainConfigs[zora.id].MINT_FEE_AMOUNT;

const valueToSend =
(BigInt(zoraMintFee) + createToken3Params.price) * quantityToMint;
Expand Down
Loading

0 comments on commit cce5564

Please sign in to comment.