From 61f326d5c85f3d824e56bc389df417cf140e84b3 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Mon, 1 Apr 2024 10:54:10 -0400 Subject: [PATCH] Ensure that ts tests for lynx pass now that it uses Polygon Amoy instead of Polygon Mumbai. --- package-lock.json | 4 ++-- src/index.ts | 2 +- test/registry.spec.ts | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index bf567afe..3ad45521 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nucypher/nucypher-contracts", - "version": "0.16.0", + "version": "0.20.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nucypher/nucypher-contracts", - "version": "0.16.0", + "version": "0.20.0", "license": "AGPL-3.0-or-later", "devDependencies": { "@typescript-eslint/eslint-plugin": "^6.9.0", diff --git a/src/index.ts b/src/index.ts index 6982dc6a..dac9357b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,7 +29,7 @@ export const domainRegistry: Record = { 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}`; diff --git a/test/registry.spec.ts b/test/registry.spec.ts index 015599a0..2ec40c31 100644 --- a/test/registry.spec.ts +++ b/test/registry.spec.ts @@ -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], ]); @@ -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); });