Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 5f4a727

Browse files
authored
Merge pull request #14 from kadena-io/chore/upstream-rebase
Chore/upstream rebase
2 parents e74825e + 04e631d commit 5f4a727

File tree

300 files changed

+6606
-1278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+6606
-1278
lines changed

.github/workflows/checks.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
if: steps.cache-node-modules.outputs.cache-hit != 'true'
4646
run: yarn --frozen-lockfile
4747

48+
- name: Generate Chakra types
49+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
50+
run: yarn chakra:typegen
51+
4852
- name: Run ESLint
4953
run: echo "skip lint:eslint for now"
5054

@@ -77,6 +81,10 @@ jobs:
7781
if: steps.cache-node-modules.outputs.cache-hit != 'true'
7882
run: yarn --frozen-lockfile
7983

84+
- name: Generate Chakra types
85+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
86+
run: yarn chakra:typegen
87+
8088
- name: Install package dependencies
8189
run: |
8290
cd ./toolkit/package
@@ -136,6 +144,10 @@ jobs:
136144
if: steps.cache-node-modules.outputs.cache-hit != 'true'
137145
run: yarn --frozen-lockfile
138146

147+
- name: Generate Chakra types
148+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
149+
run: yarn chakra:typegen
150+
139151
- name: Install script dependencies
140152
run: cd ./deploy/tools/envs-validator && yarn --frozen-lockfile
141153

@@ -175,6 +187,10 @@ jobs:
175187
if: steps.cache-node-modules.outputs.cache-hit != 'true'
176188
run: yarn --frozen-lockfile
177189

190+
- name: Generate Chakra types
191+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
192+
run: yarn chakra:typegen
193+
178194
- name: Run Jest
179195
run: yarn test:jest ${{ github.event_name == 'pull_request' && '--changedSince=origin/main' || '' }} --passWithNoTests
180196

@@ -207,6 +223,10 @@ jobs:
207223
if: steps.cache-node-modules.outputs.cache-hit != 'true'
208224
run: yarn --frozen-lockfile
209225

226+
- name: Generate Chakra types
227+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
228+
run: yarn chakra:typegen
229+
210230
- name: Install script dependencies
211231
run: cd ./deploy/tools/affected-tests && yarn --frozen-lockfile
212232

@@ -264,6 +284,10 @@ jobs:
264284
if: steps.cache-node-modules.outputs.cache-hit != 'true'
265285
run: yarn --frozen-lockfile
266286

287+
- name: Generate Chakra types
288+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
289+
run: yarn chakra:typegen
290+
267291
- name: Download affected tests list
268292
if: ${{ needs.pw_affected_tests.result == 'success' }}
269293
uses: actions/download-artifact@v4

.github/workflows/deploy-review-l2.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- neon_devnet
2626
- optimism
2727
- optimism_sepolia
28+
- optimism_superchain
2829
- polygon
2930
- rootstock
3031
- scroll_sepolia

.github/workflows/deploy-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ on:
2727
- neon_devnet
2828
- optimism
2929
- optimism_sepolia
30+
- optimism_superchain
3031
- polygon
3132
- rari_testnet
3233
- rootstock
3334
- shibarium
3435
- scroll_sepolia
3536
- stability
37+
- tac
3638
- tac_turin
3739
- zkevm
3840
- zilliqa_prototestnet

.github/workflows/upload-source-maps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
if: steps.cache-node-modules.outputs.cache-hit != 'true'
3838
run: yarn --frozen-lockfile
3939

40+
- name: Generate Chakra types
41+
if: steps.cache-node-modules.outputs.cache-hit == 'true'
42+
run: yarn chakra:typegen
43+
4044
- name: Make production build with source maps
4145
run: yarn build
4246
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/out/
1515
/public/assets/envs.js
1616
/public/assets/configs
17+
/public/assets/multichain
1718
/public/icons/sprite.svg
1819
/public/icons/sprite.*.svg
1920
/public/icons/registry.json

.vscode/settings.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"typescript.tsdk": "node_modules/typescript/lib",
3-
"javascript.preferences.autoImportFileExcludePatterns": [
4-
"./toolkit/package/**",
5-
"./toolkit/components/**/index.ts",
6-
],
7-
"typescript.preferences.autoImportFileExcludePatterns": [
8-
"./toolkit/package/**",
9-
"./toolkit/components/**/index.ts",
10-
]
11-
}
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"javascript.preferences.autoImportFileExcludePatterns": [
4+
"./toolkit/package/**",
5+
"./toolkit/components/**/index.ts"
6+
],
7+
"typescript.preferences.autoImportFileExcludePatterns": [
8+
"./toolkit/package/**",
9+
"./toolkit/components/**/index.ts"
10+
],
11+
"editor.formatOnSave": false
12+
}

.vscode/tasks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,14 @@
377377
"optimism",
378378
"optimism_interop_0",
379379
"optimism_sepolia",
380+
"optimism_superchain",
380381
"polygon",
381382
"rari_testnet",
382383
"rootstock_testnet",
383384
"scroll_sepolia",
384385
"shibarium",
385386
"stability_testnet",
387+
"tac",
386388
"tac_turin",
387389
"zkevm",
388390
"zilliqa_prototestnet",

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ WORKDIR /sitemap-generator
4545
COPY ./deploy/tools/sitemap-generator/package.json ./deploy/tools/sitemap-generator/yarn.lock ./
4646
RUN yarn --frozen-lockfile --network-timeout 100000
4747

48+
### MULTICHAIN CONFIG GENERATOR
49+
# Install dependencies
50+
WORKDIR /multichain-config-generator
51+
COPY ./deploy/tools/multichain-config-generator/package.json ./deploy/tools/multichain-config-generator/yarn.lock ./
52+
RUN yarn --frozen-lockfile --network-timeout 100000
53+
4854

4955
# *****************************
5056
# ****** STAGE 2: Build *******
@@ -106,6 +112,11 @@ COPY --from=deps /favicon-generator/node_modules ./deploy/tools/favicon-generato
106112
# Copy dependencies and source code
107113
COPY --from=deps /sitemap-generator/node_modules ./deploy/tools/sitemap-generator/node_modules
108114

115+
### MULTICHAIN CONFIG GENERATOR
116+
# Copy dependencies and source code, then build
117+
COPY --from=deps /multichain-config-generator/node_modules ./deploy/tools/multichain-config-generator/node_modules
118+
RUN cd ./deploy/tools/multichain-config-generator && yarn build
119+
109120

110121
# *****************************
111122
# ******* STAGE 3: Run ********
@@ -130,8 +141,11 @@ RUN chown nextjs:nodejs .next
130141
COPY --from=builder /app/next.config.js ./
131142
COPY --from=builder /app/public ./public
132143
COPY --from=builder /app/package.json ./package.json
144+
145+
# Copy tools
133146
COPY --from=builder /app/deploy/tools/envs-validator/index.js ./envs-validator.js
134147
COPY --from=builder /app/deploy/tools/feature-reporter/index.js ./feature-reporter.js
148+
COPY --from=builder /app/deploy/tools/multichain-config-generator/dist ./deploy/tools/multichain-config-generator/dist
135149

136150
# Copy scripts
137151
## Entripoint

configs/app/apis.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getEnvValue } from './utils';
77
export interface ApiPropsBase {
88
endpoint: string;
99
basePath?: string;
10+
socketEndpoint?: string;
1011
}
1112

1213
export interface ApiPropsFull extends ApiPropsBase {
@@ -100,6 +101,25 @@ const rewardsApi = (() => {
100101
});
101102
})();
102103

104+
const multichainApi = (() => {
105+
const apiHost = getEnvValue('NEXT_PUBLIC_MULTICHAIN_AGGREGATOR_API_HOST');
106+
if (!apiHost) {
107+
return;
108+
}
109+
110+
try {
111+
const url = new URL(apiHost);
112+
113+
return Object.freeze({
114+
endpoint: apiHost,
115+
socketEndpoint: `wss://${ url.host }`,
116+
});
117+
} catch (error) {
118+
return;
119+
}
120+
121+
})();
122+
103123
const statsApi = (() => {
104124
const apiHost = getEnvValue('NEXT_PUBLIC_STATS_API_HOST');
105125
if (!apiHost) {
@@ -135,7 +155,7 @@ const visualizeApi = (() => {
135155
});
136156
})();
137157

138-
type Apis = {
158+
export type Apis = {
139159
general: ApiPropsFull;
140160
} & Partial<Record<Exclude<ApiName, 'general'>, ApiPropsBase>>;
141161

@@ -145,6 +165,7 @@ const apis: Apis = Object.freeze({
145165
bens: bensApi,
146166
contractInfo: contractInfoApi,
147167
metadata: metadataApi,
168+
multichain: multichainApi,
148169
rewards: rewardsApi,
149170
stats: statsApi,
150171
tac: tacApi,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { Feature } from './types';
2+
3+
import { getEnvValue, getExternalAssetFilePath, parseEnvJson } from '../utils';
4+
5+
// config file will be downloaded at run-time and saved in the public folder
6+
const widgets = parseEnvJson<Array<string>>(getEnvValue('NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS'));
7+
const configUrl = getExternalAssetFilePath('NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS_CONFIG_URL');
8+
9+
const title = 'Address 3rd party widgets';
10+
11+
const config: Feature<{ widgets: Array<string>; configUrl: string }> = (() => {
12+
if (widgets && widgets.length > 0 && configUrl) {
13+
return Object.freeze({
14+
title,
15+
isEnabled: true,
16+
widgets,
17+
configUrl,
18+
});
19+
}
20+
21+
return Object.freeze({
22+
title,
23+
isEnabled: false,
24+
});
25+
})();
26+
27+
export default config;

0 commit comments

Comments
 (0)