Skip to content

Commit 7309e1c

Browse files
authored
zeta chain cctx (#2904)
* zetachain start * zeta chain cctx table * pagination * cctx page init * meta for new route * remove backlink * schema * continue * fix * navigation * filters to test * some fixes * add chain filter * add error message and revert options * address chain logo fix * cctx search * socket * fix conflict * fixes1 * fixes2 * fixes3 * fixes4 * fixes5 * tests * fixes6 * test fixes * revert options fix * stats and revert semi-fix * fix readme * cleanup * check for cctx in lifecycle * update config * fixes 8 * fixes 9 * update config * fixes10
1 parent 61ace1b commit 7309e1c

File tree

147 files changed

+5270
-214
lines changed

Some content is hidden

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

147 files changed

+5270
-214
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ on:
3333
- scroll_sepolia
3434
- shibarium
3535
- stability
36+
- zetachain
37+
- zetachain_testnet
3638
- zkevm
3739
- zilliqa
3840
- zksync

.github/workflows/deploy-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ on:
3838
- stability
3939
- tac
4040
- tac_turin
41+
- zetachain
42+
- zetachain_testnet
4143
- zkevm
4244
- zilliqa
4345
- zksync

.vscode/tasks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@
388388
"stability_testnet",
389389
"tac",
390390
"tac_turin",
391+
"zetachain",
392+
"zetachain_testnet",
391393
"zkevm",
392394
"zilliqa",
393395
"zksync",

configs/app/apis.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,24 @@ const visualizeApi = (() => {
167167
});
168168
})();
169169

170+
const zetachainApi = (() => {
171+
const apiHost = getEnvValue('NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST');
172+
if (!apiHost) {
173+
return;
174+
}
175+
176+
try {
177+
const url = new URL(apiHost);
178+
179+
return Object.freeze({
180+
endpoint: apiHost,
181+
socketEndpoint: `wss://${ url.host }/socket`,
182+
});
183+
} catch (error) {
184+
return;
185+
}
186+
})();
187+
170188
export type Apis = {
171189
general: ApiPropsFull;
172190
} & Partial<Record<Exclude<ApiName, 'general'>, ApiPropsBase>>;
@@ -183,6 +201,7 @@ const apis: Apis = Object.freeze({
183201
tac: tacApi,
184202
userOps: userOpsApi,
185203
visualize: visualizeApi,
204+
zetachain: zetachainApi,
186205
});
187206

188207
export default apis;

configs/app/features/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ export { default as validators } from './validators';
4747
export { default as verifiedTokens } from './verifiedTokens';
4848
export { default as web3Wallet } from './web3Wallet';
4949
export { default as xStarScore } from './xStarScore';
50+
export { default as zetachain } from './zetachain';

configs/app/features/zetachain.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { Feature } from './types';
2+
3+
import apis from '../apis';
4+
import { getEnvValue, getExternalAssetFilePath } from '../utils';
5+
6+
const title = 'ZetaChain transactions';
7+
8+
const chainsConfigUrl = getExternalAssetFilePath('NEXT_PUBLIC_ZETACHAIN_SERVICE_CHAINS_CONFIG_URL');
9+
const cosmosTxUrlTemplate = getEnvValue('NEXT_PUBLIC_ZETACHAIN_COSMOS_TX_URL_TEMPLATE');
10+
const cosmosAddressUrlTemplate = getEnvValue('NEXT_PUBLIC_ZETACHAIN_COSMOS_ADDRESS_URL_TEMPLATE');
11+
12+
const config: Feature<{ chainsConfigUrl: string; cosmosTxUrlTemplate: string; cosmosAddressUrlTemplate: string }> = (() => {
13+
if (apis.zetachain && chainsConfigUrl && cosmosTxUrlTemplate && cosmosAddressUrlTemplate) {
14+
return Object.freeze({
15+
title,
16+
isEnabled: true,
17+
chainsConfigUrl,
18+
cosmosTxUrlTemplate,
19+
cosmosAddressUrlTemplate,
20+
});
21+
}
22+
23+
return Object.freeze({
24+
title,
25+
isEnabled: false,
26+
});
27+
})();
28+
29+
export default config;

configs/envs/.env.pw

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ NEXT_PUBLIC_REWARDS_SERVICE_API_HOST=http://localhost:3009
5252
NEXT_PUBLIC_MULTICHAIN_AGGREGATOR_API_HOST=http://localhost:3010
5353
NEXT_PUBLIC_TAC_OPERATION_LIFECYCLE_API_HOST=http://localhost:3100
5454
NEXT_PUBLIC_USER_OPS_INDEXER_API_HOST=http://localhost:3110
55+
NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST=http://localhost:3111
5556
NEXT_PUBLIC_RE_CAPTCHA_APP_SITE_KEY=xxx
5657
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=xxx
5758
NEXT_PUBLIC_VIEWS_ADDRESS_FORMAT=['base16','bech32']

configs/envs/.env.zetachain

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Set of ENVs for ZetaChain Mainnet network explorer
2+
# https://zetachain.blockscout.com
3+
# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=zetachain"
4+
5+
# Local ENVs
6+
NEXT_PUBLIC_APP_PROTOCOL=http
7+
NEXT_PUBLIC_APP_HOST=localhost
8+
NEXT_PUBLIC_APP_PORT=3000
9+
NEXT_PUBLIC_APP_ENV=development
10+
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
11+
12+
# Instance ENVs
13+
NEXT_PUBLIC_AD_BANNER_PROVIDER=none
14+
NEXT_PUBLIC_AD_TEXT_PROVIDER=none
15+
NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS=['talentprotocol', 'efp', 'webacy', 'deepdao','bankless', 'blockscoutbadges']
16+
NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS_CONFIG_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/widgets/config.json
17+
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
18+
NEXT_PUBLIC_API_BASE_PATH=/
19+
NEXT_PUBLIC_API_HOST=zetachain.blockscout.com
20+
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
21+
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
22+
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
23+
NEXT_PUBLIC_DEFI_DROPDOWN_ITEMS=[{'text':'Revokescout','icon':'integration/partial','dappId':'revokescout'}, {'text':'Get gas','icon':'gas','dappId':'smol-refuel'}]
24+
NEXT_PUBLIC_DEX_POOLS_ENABLED=true
25+
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/zetachain-mainnet.json
26+
NEXT_PUBLIC_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/sherblockHolmesBadge
27+
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x1a2da552c0082540ffa356eec24db742e9aa18e072a643feec6a958a76b02fdf
28+
NEXT_PUBLIC_HAS_CONTRACT_AUDIT_REPORTS=true
29+
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
30+
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG={'background':['linear-gradient(0, rgb(0,87,65), rgb(0,87,65))'],'text_color':['rgb(220, 254, 118)']}
31+
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
32+
NEXT_PUBLIC_MARKETPLACE_CATEGORIES_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/marketplace-categories/default.json
33+
NEXT_PUBLIC_MARKETPLACE_ENABLED=true
34+
NEXT_PUBLIC_MARKETPLACE_FEATURED_APP=rubic
35+
NEXT_PUBLIC_MARKETPLACE_RATING_AIRTABLE_BASE_ID=appGkvtmKI7fXE4Vs
36+
NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM=https://airtable.com/appiy5yijZpMMSKjT/shr6uMGPKjj1DK7NL
37+
NEXT_PUBLIC_MARKETPLACE_SUGGEST_IDEAS_FORM=https://airtable.com/appiy5yijZpMMSKjT/pag3t82DUCyhGRZZO/form
38+
NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com
39+
NEXT_PUBLIC_NAME_SERVICE_API_HOST=https://bens.services.blockscout.com
40+
NEXT_PUBLIC_NAVIGATION_HIGHLIGHTED_ROUTES=['/pools']
41+
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
42+
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=ZETA
43+
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ZETA
44+
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'GeckoTerminal','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/geckoterminal.png','baseUrl':'https://www.geckoterminal.com/','paths':{'token':'/zetachain/pools'}}]
45+
NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/zetachain.svg
46+
NEXT_PUBLIC_NETWORK_ID=7000
47+
NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/zetachain.svg
48+
NEXT_PUBLIC_NETWORK_NAME=ZetaChain Mainnet
49+
NEXT_PUBLIC_NETWORK_RPC_URL=https://zetachain-evm.blockpi.network/v1/rpc/public
50+
NEXT_PUBLIC_NETWORK_SHORT_NAME=ZetaChain Mainnet
51+
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true
52+
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/zetachain-mainnet.png
53+
NEXT_PUBLIC_PUZZLE_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/capyPuzzleBadge
54+
NEXT_PUBLIC_STATS_API_BASE_PATH=/stats-service
55+
NEXT_PUBLIC_STATS_API_HOST=https://zetachain.blockscout.com
56+
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=noves
57+
NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE=blockie
58+
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
59+
NEXT_PUBLIC_VIEWS_TOKEN_SCAM_TOGGLE_ENABLED=true
60+
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
61+
NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST=https://zetachain-cctx-mainnet.k8s-prod-2.blockscout.com
62+
NEXT_PUBLIC_ZETACHAIN_SERVICE_CHAINS_CONFIG_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/refs/heads/main/configs/cross-chain/zetachain-mainnet.json
63+
NEXT_PUBLIC_ZETACHAIN_COSMOS_TX_URL_TEMPLATE=https://zetachain.exploreme.pro/transactions/{hash}
64+
NEXT_PUBLIC_ZETACHAIN_COSMOS_ADDRESS_URL_TEMPLATE=https://zetachain.exploreme.pro/account/{hash}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Set of ENVs for ZetaChain testnet network explorer
2+
# https://zetachain-testnet.blockscout.com
3+
# This is an auto-generated file. To update all values, run "yarn dev:preset:sync --name=zetachain_testnet"
4+
5+
# Local ENVs
6+
NEXT_PUBLIC_APP_PROTOCOL=http
7+
NEXT_PUBLIC_APP_HOST=localhost
8+
NEXT_PUBLIC_APP_PORT=3000
9+
NEXT_PUBLIC_APP_ENV=development
10+
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws
11+
12+
# Instance ENVs
13+
NEXT_PUBLIC_AD_BANNER_PROVIDER=none
14+
NEXT_PUBLIC_AD_TEXT_PROVIDER=none
15+
NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS=['talentprotocol', 'efp', 'webacy', 'deepdao', 'humanpassport', 'bankless', 'blockscoutbadges']
16+
NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS_CONFIG_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/widgets/config.json
17+
NEXT_PUBLIC_ADMIN_SERVICE_API_HOST=https://admin-rs.services.blockscout.com
18+
NEXT_PUBLIC_API_BASE_PATH=/
19+
NEXT_PUBLIC_API_HOST=zetachain-testnet.blockscout.com
20+
NEXT_PUBLIC_API_SPEC_URL=https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
21+
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}]
22+
NEXT_PUBLIC_CONTRACT_INFO_API_HOST=https://contracts-info.services.blockscout.com
23+
NEXT_PUBLIC_FEATURED_NETWORKS=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/zetachain-athens-3.json
24+
NEXT_PUBLIC_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/sherblockHolmesBadge
25+
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0x1a2da552c0082540ffa356eec24db742e9aa18e072a643feec6a958a76b02fdf
26+
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs']
27+
NEXT_PUBLIC_HOMEPAGE_HERO_BANNER_CONFIG={'background':['linear-gradient(0, rgb(0,87,65), rgb(0,87,65))'],'text_color':['rgb(220, 254, 118)']}
28+
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true
29+
NEXT_PUBLIC_IS_TESTNET=true
30+
NEXT_PUBLIC_MARKETPLACE_ENABLED=false
31+
NEXT_PUBLIC_METADATA_SERVICE_API_HOST=https://metadata.services.blockscout.com
32+
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18
33+
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=tZETA
34+
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=tZETA
35+
NEXT_PUBLIC_NETWORK_ICON=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/zetachain.svg
36+
NEXT_PUBLIC_NETWORK_ID=7001
37+
NEXT_PUBLIC_NETWORK_LOGO=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/zetachain.svg
38+
NEXT_PUBLIC_NETWORK_NAME=ZetaChain testnet
39+
NEXT_PUBLIC_NETWORK_RPC_URL=https://zetachain-athens-evm.blockpi.network/v1/rpc/public
40+
NEXT_PUBLIC_NETWORK_SHORT_NAME=ZetaChain testnet
41+
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true
42+
NEXT_PUBLIC_OG_IMAGE_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/og-images/zetachain-testnet.png
43+
NEXT_PUBLIC_PUZZLE_GAME_BADGE_CLAIM_LINK=https://badges.blockscout.com/mint/capyPuzzleBadge
44+
NEXT_PUBLIC_STATS_API_BASE_PATH=/stats-service
45+
NEXT_PUBLIC_STATS_API_HOST=https://zetachain-testnet.blockscout.com
46+
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=noves
47+
NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE=blockie
48+
NEXT_PUBLIC_VIEWS_CONTRACT_SOLIDITYSCAN_ENABLED=true
49+
NEXT_PUBLIC_VIEWS_TOKEN_SCAM_TOGGLE_ENABLED=true
50+
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com
51+
NEXT_PUBLIC_ZETACHAIN_SERVICE_API_HOST=https://zetachain-cctx-testnet.k8s-prod-1.blockscout.com
52+
NEXT_PUBLIC_ZETACHAIN_SERVICE_CHAINS_CONFIG_URL=https://raw.githubusercontent.com/blockscout/frontend-configs/refs/heads/main/configs/cross-chain/zetachain-testnet.json
53+
NEXT_PUBLIC_ZETACHAIN_COSMOS_TX_URL_TEMPLATE=https://testnet.zetachain.exploreme.pro/transactions/{hash}
54+
NEXT_PUBLIC_ZETACHAIN_COSMOS_ADDRESS_URL_TEMPLATE=https://testnet.zetachain.exploreme.pro/account/{hash}
55+
NEXT_PUBLIC_DATA_AVAILABILITY_ENABLED=true

deploy/scripts/download_assets.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ASSETS_ENVS=(
2626
"NEXT_PUBLIC_NETWORK_ICON_DARK"
2727
"NEXT_PUBLIC_OG_IMAGE_URL"
2828
"NEXT_PUBLIC_ADDRESS_3RD_PARTY_WIDGETS_CONFIG_URL"
29+
"NEXT_PUBLIC_ZETACHAIN_SERVICE_CHAINS_CONFIG_URL"
2930
)
3031

3132
# Create the assets directory if it doesn't exist

0 commit comments

Comments
 (0)