Skip to content

Commit

Permalink
Update typescript tests for tapir to use chain id 80002 (amoy) instea…
Browse files Browse the repository at this point in the history
…d of 80001 (mumbai).
  • Loading branch information
derekpierre committed Apr 2, 2024
1 parent 8a97850 commit 4cde3d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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 | 80002;
export type ChainId = 1 | 5 | 137 | 80002;

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

Expand Down
6 changes: 3 additions & 3 deletions test/registry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ChainId, type ContractName, contractNames, type Domain, getContract } f

const testCases: Array<[string, number, ContractName]> = contractNames.flatMap((contract) => [
["lynx", 80002, contract],
["tapir", 80001, contract],
["tapir", 80002, contract],
["mainnet", 137, contract],
]);

Expand All @@ -18,7 +18,7 @@ describe("registry", () => {
);

it("should throw for invalid domain", () => {
expect(() => getContract("invalid-domain", 80001, "Coordinator")).toThrow();
expect(() => getContract("invalid-domain", 80002, "Coordinator")).toThrow();
});

it("should throw for invalid chainId", () => {
Expand All @@ -37,7 +37,7 @@ describe("registry", () => {

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

0 comments on commit 4cde3d0

Please sign in to comment.