Skip to content

Commit 8080e1d

Browse files
committed
feat(filecoin): filecoin mainnet config
updates contracts packages and exposes filecoin deployments
1 parent d9426c2 commit 8080e1d

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
],
2323
"dependencies": {
2424
"@graphql-typed-document-node/core": "^3.2.0",
25-
"@hypercerts-org/contracts": "2.0.0-alpha.9",
25+
"@hypercerts-org/contracts": "2.0.0-alpha.12",
2626
"@openzeppelin/merkle-tree": "^1.0.7",
2727
"@swc/core": "^1.6.3",
2828
"ajv": "^8.11.2",
@@ -45,6 +45,7 @@
4545
"@types/node": "^20.12.2",
4646
"@types/sinon": "^17.0.2",
4747
"@viem/anvil": "^0.0.6",
48+
"@vitest/coverage-v8": "^3.0.3",
4849
"chai": "^4.3.7",
4950
"chai-assertions-count": "^1.0.2",
5051
"chai-subset": "^1.6.0",
@@ -65,7 +66,7 @@
6566
"sinon": "^17.0.1",
6667
"typescript": "5.4.5",
6768
"typescript-eslint": "^8.2.0",
68-
"vitest": "^1.6.0"
69+
"vitest": "^3.0.3"
6970
},
7071
"scripts": {
7172
"build": "pnpm types:json && pnpm codegen:api && rollup -c",
@@ -76,6 +77,7 @@
7677
"update:submodules": "git submodule update --init --recursive",
7778
"test": "vitest run",
7879
"test:watch": "vitest --watch",
80+
"test:coverage": "vitest --coverage",
7981
"types:json": "pnpm json2ts -i './src/resources/schema/' -o 'src/types' --cwd './src/resources/schema'",
8082
"prepare": "husky",
8183
"commitlint": "commitlint --config commitlintrc.ts --edit"

src/constants.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ const DEPLOYMENTS: { [key in SupportedChainIds]: Deployment } = {
5151
addresses: deployments[421614],
5252
isTestnet: true,
5353
} as const,
54+
314159: {
55+
chainId: 314159,
56+
addresses: deployments[314159],
57+
isTestnet: true,
58+
} as const,
59+
314: {
60+
chainId: 314,
61+
addresses: deployments[314],
62+
isTestnet: false,
63+
} as const,
5464
};
5565

5666
export { ENDPOINTS, DEPLOYMENTS };

src/types/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { HypercertMetadata } from "./metadata";
44
import { ByteArray, Hex, PublicClient, WalletClient } from "viem";
55
import { AxiosRequestConfig } from "axios";
66

7-
export type TestChainIds = 11155111 | 84532 | 421614;
8-
export type ProductionChainIds = 10 | 42220 | 8453 | 42161;
7+
export type TestChainIds = 11155111 | 84532 | 421614 | 314159;
8+
export type ProductionChainIds = 10 | 42220 | 8453 | 42161 | 314;
99

1010
/**
1111
* Enum to verify the supported chainIds

src/utils/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { createPublicClient, http } from "viem";
1919
* - 8453: Base Mainnet
2020
* - 42161: Arbitrum One
2121
* - 421614: Arbitrum Sepolia
22+
* - 314159: Filecoin Calibration
23+
* - 314: Filecoin mainnet
2224
*
2325
* @param config - An object containing any configuration values to override. This should be a partial HypercertClientConfig object.
2426
* @returns The final configuration object for the Hypercert client.

0 commit comments

Comments
 (0)