Skip to content

Commit 076f11a

Browse files
committed
update
1 parent bc03454 commit 076f11a

File tree

5 files changed

+125
-0
lines changed

5 files changed

+125
-0
lines changed

src/components/CCIP/ChainHero/ChainHero.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,46 @@
168168
grid-column: 1 / -1; /* Span all columns */
169169
}
170170
}
171+
172+
/* Pool Programs Styles */
173+
.ccip-chain-hero__pool-programs-container {
174+
display: grid;
175+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
176+
gap: var(--space-3x);
177+
width: 100%;
178+
}
179+
180+
.ccip-chain-hero__pool-program-entry {
181+
display: flex;
182+
align-items: center;
183+
gap: var(--space-1x);
184+
min-width: 0; /* Critical: allows flex children to shrink below content size */
185+
}
186+
187+
.ccip-chain-hero__pool-program-type {
188+
font-size: var(--font-size-s);
189+
font-weight: normal;
190+
color: var(--gray-700);
191+
white-space: nowrap;
192+
flex-shrink: 0; /* Prevent label from shrinking */
193+
}
194+
195+
.ccip-chain-hero__pool-program-address {
196+
display: flex;
197+
align-items: center;
198+
gap: var(--space-1x);
199+
min-width: 0; /* Allow address container to shrink */
200+
flex: 1; /* Take remaining space */
201+
}
202+
203+
/* Mobile responsive styles for pool programs */
204+
@media (max-width: 768px) {
205+
.ccip-chain-hero__pool-programs-container {
206+
grid-template-columns: 1fr; /* Single column on mobile */
207+
gap: var(--space-2x);
208+
}
209+
210+
.ccip-chain-hero__pool-program-entry {
211+
width: 100%;
212+
}
213+
}

src/components/CCIP/ChainHero/ChainHero.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "~/features/utils/index.ts"
1515
import { Tooltip } from "~/features/common/Tooltip/Tooltip.tsx"
1616
import { getChainTooltip } from "../Tooltip/index.ts"
17+
import { PoolProgramTooltip } from "../Tooltip/PoolProgramTooltip.tsx"
1718
import { ExplorerInfo, ChainType } from "@config/types.ts"
1819

1920
interface ChainHeroProps {
@@ -319,6 +320,39 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
319320
</div>
320321
)}
321322

323+
{network.chainType === "solana" && network.poolPrograms && (
324+
<div className="ccip-chain-hero__details__item">
325+
<div className="ccip-chain-hero__details__label">
326+
Self-service pool programs
327+
<PoolProgramTooltip />
328+
</div>
329+
<div className="ccip-chain-hero__details__value ccip-chain-hero__pool-programs-container">
330+
{network.poolPrograms.BurnMintTokenPool && (
331+
<div className="ccip-chain-hero__pool-program-entry">
332+
<span className="ccip-chain-hero__pool-program-type">BurnMint:</span>
333+
<Address
334+
endLength={4}
335+
contractUrl={getExplorerAddressUrl(network.explorer)(network.poolPrograms.BurnMintTokenPool)}
336+
address={network.poolPrograms.BurnMintTokenPool}
337+
/>
338+
</div>
339+
)}
340+
{network.poolPrograms.LockReleaseTokenPool && (
341+
<div className="ccip-chain-hero__pool-program-entry">
342+
<span className="ccip-chain-hero__pool-program-type">LockRelease:</span>
343+
<Address
344+
endLength={4}
345+
contractUrl={getExplorerAddressUrl(network.explorer)(
346+
network.poolPrograms.LockReleaseTokenPool
347+
)}
348+
address={network.poolPrograms.LockReleaseTokenPool}
349+
/>
350+
</div>
351+
)}
352+
</div>
353+
</div>
354+
)}
355+
322356
{/* Start of new Fee Tokens Group */}
323357
{network &&
324358
((feeTokensWithAddress && feeTokensWithAddress.length > 0) ||
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React from "react"
2+
import { Tooltip } from "~/features/common/Tooltip/Tooltip.tsx"
3+
4+
export const PoolProgramTooltip: React.FC = () => (
5+
<Tooltip
6+
label=""
7+
tip={
8+
<div>
9+
Official Chainlink self-service pool programs for initializing token pools on Solana.
10+
<ul style={{ margin: "8px 0", paddingLeft: "20px" }}>
11+
<li>
12+
<strong>BurnMint:</strong> Burns tokens on outbound transfers, mints tokens on inbound transfers
13+
</li>
14+
<li>
15+
<strong>LockRelease:</strong> Locks tokens on outbound transfers, releases tokens on inbound transfers
16+
</li>
17+
</ul>
18+
For hands-on tutorial, see{" "}
19+
<a href="/ccip/tutorials/svm/cross-chain-tokens" style={{ color: "var(--blue-500)" }}>
20+
Cross-Chain Tokens on Solana
21+
</a>
22+
.
23+
</div>
24+
}
25+
labelStyle={{
26+
marginRight: "8px",
27+
}}
28+
style={{
29+
display: "inline-block",
30+
verticalAlign: "middle",
31+
marginBottom: "2px",
32+
marginLeft: "4px",
33+
}}
34+
hoverable={true}
35+
hideDelay={300}
36+
/>
37+
)

src/config/data/ccip/data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ export const getAllNetworks = ({ filter }: { filter: Environment }): Network[] =
449449
armProxy: chains[chain].armProxy,
450450
feeQuoter: chainType === "solana" ? chains[chain]?.feeQuoter : undefined,
451451
rmnPermeable: chains[chain]?.rmnPermeable,
452+
poolPrograms: chainType === "solana" ? chains[chain]?.poolPrograms : undefined,
452453
})
453454
}
454455

src/config/data/ccip/types.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ export type ChainConfig = {
7777
symbol: string
7878
logo: string
7979
}
80+
poolPrograms?: {
81+
BurnMintTokenPool?: string
82+
LockReleaseTokenPool?: string
83+
CCTPTokenPool?: string
84+
}
8085
}
8186

8287
export type ChainsConfig = {
@@ -194,6 +199,11 @@ export interface Network {
194199
routerExplorerUrl: string
195200
feeQuoter?: string
196201
rmnPermeable: boolean
202+
poolPrograms?: {
203+
BurnMintTokenPool?: string
204+
LockReleaseTokenPool?: string
205+
CCTPTokenPool?: string
206+
}
197207
}
198208

199209
export type DecomConfig = {

0 commit comments

Comments
 (0)