Skip to content

Commit bf0dd15

Browse files
committed
feat(filecoin): filecoin mainnet config
updates contracts packages and exposes filecoin deployments
1 parent ec1123b commit bf0dd15

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ yarn-debug.log*
1919
yarn-error.log*
2020
.DS_Store
2121
/.idea
22-
stats.html
22+
stats.html
23+
coverage/

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.11",
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ const DEPLOYMENTS: { [key in SupportedChainIds]: Deployment } = {
5656
addresses: deployments[314159],
5757
isTestnet: true,
5858
} as const,
59+
314: {
60+
chainId: 314,
61+
addresses: deployments[314],
62+
isTestnet: false,
63+
} as const,
5964
};
6065

6166
export { ENDPOINTS, DEPLOYMENTS };

src/types/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ByteArray, Hex, PublicClient, WalletClient } from "viem";
55
import { AxiosRequestConfig } from "axios";
66

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

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

src/utils/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { createPublicClient, http } from "viem";
2020
* - 42161: Arbitrum One
2121
* - 421614: Arbitrum Sepolia
2222
* - 314159: Filecoin Calibration
23+
* - 314: Filecoin mainnet
2324
*
2425
* @param config - An object containing any configuration values to override. This should be a partial HypercertClientConfig object.
2526
* @returns The final configuration object for the Hypercert client.

0 commit comments

Comments
 (0)