Skip to content

Commit

Permalink
Ensure that ts tests for lynx pass now that it uses Polygon Amoy inst…
Browse files Browse the repository at this point in the history
…ead of Polygon Mumbai.
  • Loading branch information
derekpierre committed Apr 1, 2024
1 parent 881b311 commit 61f326d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const domainRegistry: Record<string, ContractRegistry> = {

export type Domain = "mainnet" | "oryx" | "tapir" | "lynx";

export type ChainId = 1 | 5 | 137 | 80001;
export type ChainId = 1 | 5 | 137 | 80001 | 80002;

export type ChecksumAddress = `0x${string}`;

Expand Down
8 changes: 4 additions & 4 deletions test/registry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest";
import { ChainId, type ContractName, contractNames, type Domain, getContract } from "../src";

const testCases: Array<[string, number, ContractName]> = contractNames.flatMap((contract) => [
["lynx", 80001, contract],
["lynx", 80002, contract],
["tapir", 80001, contract],
["mainnet", 137, contract],
]);
Expand All @@ -30,13 +30,13 @@ describe("registry", () => {
});

it("should return the same contract address for the same domain, chainId, and contract", () => {
const contractAddress1 = getContract("lynx", 80001, "Coordinator");
const contractAddress2 = getContract("lynx", 80001, "Coordinator");
const contractAddress1 = getContract("lynx", 80002, "Coordinator");
const contractAddress2 = getContract("lynx", 80002, "Coordinator");
expect(contractAddress1).toEqual(contractAddress2);
});

it("should return different contract addresses for different domains", () => {
const contractAddress1 = getContract("lynx", 80001, "Coordinator");
const contractAddress1 = getContract("lynx", 80002, "Coordinator");
const contractAddress2 = getContract("tapir", 80001, "Coordinator");
expect(contractAddress1).not.toEqual(contractAddress2);
});
Expand Down

0 comments on commit 61f326d

Please sign in to comment.