Skip to content

Commit fe20ae9

Browse files
ccip aptos (#2944)
* WIP (Facing issue with ccip/api-reference/aptos/v1.6.0 URL) fix api ref aptos Updates prerequisites Updates and fixes Vercel-Deploy Access Test Added Prerequisites for EVM to Aptos, and other fixes nit comments nit Added steps for running dripLinkToken.ts and dripCCIPBnMToken.ts scripts, along with other improvements empty Updates and fixes Fixes in CCIP-Aptos-API-Reference (suggested by John Chang) Removed information from titles in API Reference Added conceptual docs to Aptos Added conceptual docs to Aptos Added Arbitrary Messaging and Programmatic Token Transfers Tutorials, Receiver API Reference and Polished Images in Conceptual Flow Diagrams fix api ref aptos Updates Updates and fixes Vercel-Deploy Access Test Added Prerequisites for EVM to Aptos, and other fixes nit comments nit Added steps for running dripLinkToken.ts and dripCCIPBnMToken.ts scripts, along with other improvements empty Updates and fixes Fixes in CCIP-Aptos-API-Reference (suggested by John Chang) Removed information from titles in API Reference Added conceptual docs to Aptos Added conceptual docs to Aptos aptos directory Add Service Limits and other updates/fixes Updates Add step to run CCIP-BnM faucet script in aptos/source/prerequisites.mdx Removed Avalanche Fuji option Removed Avalanche Fuji option Removed Avalanche Fuji option Revised the note in prerequisites.mdx * Add SEO fields and named addresses explanation section --------- Co-authored-by: SyedAsadKazmi <syed.asadkazmi@smartcontract.com>
1 parent d52f1e3 commit fe20ae9

Some content is hidden

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

67 files changed

+4667
-44
lines changed
546 KB
Loading
509 KB
Loading

src/components/CCIP/Chain/Chain.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const chainStructuredData = generateChainStructuredData(
127127
<div class="ccip-heading">
128128
<h2>Tokens <span>({allTokens.length})</span></h2>
129129
{
130-
network.chainType !== "solana" && (
130+
network.chainType !== "solana" && network.chainType !== "aptos" && (
131131
<a class="button secondary" href="/ccip/tutorials/evm/token-manager#verifying-your-token">
132132
<img
133133
src="/assets/icons/plus.svg"

src/components/CCIP/ChainHero/ChainHero.tsx

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
6969
})
7070
const explorer = network.explorer || {}
7171
const address = token[network.chain]?.tokenAddress
72-
const contractUrl = address ? getExplorerAddressUrl(explorer)(address) : ""
72+
const contractUrl = address ? getExplorerAddressUrl(explorer, network.chainType)(address) : ""
7373

7474
return {
7575
logo,
@@ -152,7 +152,15 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
152152
<div className="ccip-chain-hero__details__item">
153153
<div className="ccip-chain-hero__details__label">Router</div>
154154
<div className="ccip-chain-hero__details__value" data-clipboard-type="router">
155-
<Address endLength={4} contractUrl={network.routerExplorerUrl} address={network.router?.address} />
155+
<Address
156+
endLength={4}
157+
contractUrl={
158+
network.router?.address
159+
? getExplorerAddressUrl(network.explorer, network.chainType)(network.router.address)
160+
: ""
161+
}
162+
address={network.router?.address}
163+
/>
156164
</div>
157165
</div>
158166
<div className="ccip-chain-hero__details__item">
@@ -195,7 +203,7 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
195203
{network.armProxy ? (
196204
<Address
197205
endLength={4}
198-
contractUrl={getExplorerAddressUrl(network.explorer)(network.armProxy.address)}
206+
contractUrl={getExplorerAddressUrl(network.explorer, network.chainType)(network.armProxy.address)}
199207
address={network.armProxy.address}
200208
/>
201209
) : (
@@ -249,7 +257,10 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
249257
{network.tokenAdminRegistry ? (
250258
<Address
251259
endLength={4}
252-
contractUrl={getExplorerAddressUrl(network.explorer)(network.tokenAdminRegistry)}
260+
contractUrl={getExplorerAddressUrl(
261+
network.explorer,
262+
network.chainType
263+
)(network.tokenAdminRegistry)}
253264
address={network.tokenAdminRegistry}
254265
/>
255266
) : (
@@ -277,7 +288,7 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
277288
{network.registryModule ? (
278289
<Address
279290
endLength={4}
280-
contractUrl={getExplorerAddressUrl(network.explorer)(network.registryModule)}
291+
contractUrl={getExplorerAddressUrl(network.explorer, network.chainType)(network.registryModule)}
281292
address={network.registryModule}
282293
/>
283294
) : (
@@ -288,6 +299,69 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
288299
</>
289300
)}
290301

302+
{network.chainType === "aptos" && (
303+
<>
304+
<div className="ccip-chain-hero__details__item">
305+
<div className="ccip-chain-hero__details__label">
306+
Token admin registry
307+
<Tooltip
308+
label=""
309+
tip="The TokenAdminRegistry module is responsible for managing the configuration of token pools for all cross chain tokens."
310+
labelStyle={{
311+
marginRight: "8px",
312+
}}
313+
style={{
314+
display: "inline-block",
315+
verticalAlign: "middle",
316+
marginBottom: "2px",
317+
}}
318+
/>
319+
</div>
320+
<div className="ccip-chain-hero__details__value" data-clipboard-type="token-registry">
321+
{network.tokenAdminRegistry ? (
322+
<Address
323+
endLength={4}
324+
contractUrl={getExplorerAddressUrl(
325+
network.explorer,
326+
network.chainType
327+
)(network.tokenAdminRegistry)}
328+
address={network.tokenAdminRegistry}
329+
/>
330+
) : (
331+
"n/a"
332+
)}
333+
</div>
334+
</div>
335+
336+
{network.mcms && (
337+
<div className="ccip-chain-hero__details__item">
338+
<div className="ccip-chain-hero__details__label">
339+
MCMS
340+
<Tooltip
341+
label=""
342+
tip="The MCMS address must be added as a dependency in your Move.toml file when building modules that interact with CCIP on Aptos chains."
343+
labelStyle={{
344+
marginRight: "8px",
345+
}}
346+
style={{
347+
display: "inline-block",
348+
verticalAlign: "middle",
349+
marginBottom: "2px",
350+
}}
351+
/>
352+
</div>
353+
<div className="ccip-chain-hero__details__value" data-clipboard-type="mcms">
354+
<Address
355+
endLength={4}
356+
contractUrl={getExplorerAddressUrl(network.explorer, network.chainType)(network.mcms)}
357+
address={network.mcms}
358+
/>
359+
</div>
360+
</div>
361+
)}
362+
</>
363+
)}
364+
291365
{network.chainType === "solana" && (
292366
<div className="ccip-chain-hero__details__item">
293367
<div className="ccip-chain-hero__details__label">
@@ -309,7 +383,7 @@ function ChainHero({ chains, tokens, network, token, environment, lanes }: Chain
309383
{network.feeQuoter ? (
310384
<Address
311385
endLength={4}
312-
contractUrl={getExplorerAddressUrl(network.explorer)(network.feeQuoter)}
386+
contractUrl={getExplorerAddressUrl(network.explorer, network.chainType)(network.feeQuoter)}
313387
address={network.feeQuoter}
314388
/>
315389
) : (

src/components/CCIP/ChainHero/LaneDetailsHero.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,23 @@ function LaneDetailsHero({
135135
{/* Display address information based on lane type */}
136136
{inOutbound === LaneFilter.Inbound ? (
137137
<DetailItem label="OffRamp address" clipboardType="offramp">
138-
<AddressComponent address={offRamp} endLength={6} contractUrl={getExplorerAddressUrl(explorer)(offRamp)} />
138+
<AddressComponent
139+
address={offRamp}
140+
endLength={6}
141+
contractUrl={getExplorerAddressUrl(explorer, destinationNetwork.chainType)(offRamp)}
142+
/>
139143
</DetailItem>
140144
) : (
141145
<DetailItem
142146
label="OnRamp address"
143147
clipboardType="onramp"
144148
tooltip={sourceNetwork.chainType === "solana" ? <StyledTooltip tip="Same as Router." /> : undefined}
145149
>
146-
<AddressComponent address={onRamp} endLength={6} contractUrl={getExplorerAddressUrl(explorer)(onRamp)} />
150+
<AddressComponent
151+
address={onRamp}
152+
endLength={6}
153+
contractUrl={getExplorerAddressUrl(explorer, sourceNetwork.chainType)(onRamp)}
154+
/>
147155
</DetailItem>
148156
)}
149157

src/components/CCIP/ChainHero/TokenDetailsHero.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import { getExplorerAddressUrl, fallbackTokenIconUrl } from "~/features/utils/in
33
import { PoolType } from "~/config/data/ccip/types.ts"
44
import { tokenPoolDisplay } from "~/config/data/ccip/utils.ts"
55
import "./ChainHero.css"
6-
import { ExplorerInfo } from "~/config/types.ts"
6+
import { ExplorerInfo, ChainType } from "~/config/types.ts"
77

88
interface TokenDetailsHeroProps {
99
network: {
1010
name: string
1111
logo: string
1212
explorer: ExplorerInfo
13+
chainType?: ChainType
1314
}
1415
token: {
1516
id: string
@@ -59,7 +60,7 @@ function TokenDetailsHero({ network, token }: TokenDetailsHeroProps) {
5960
<div className="ccip-chain-hero__details__value" data-clipboard-type="token">
6061
<Address
6162
endLength={4}
62-
contractUrl={getExplorerAddressUrl(network?.explorer)(token.address)}
63+
contractUrl={getExplorerAddressUrl(network?.explorer, network?.chainType)(token.address)}
6364
address={token.address}
6465
/>
6566
</div>
@@ -73,7 +74,7 @@ function TokenDetailsHero({ network, token }: TokenDetailsHeroProps) {
7374
<div className="ccip-chain-hero__details__value" data-clipboard-type="token-pool">
7475
<Address
7576
endLength={4}
76-
contractUrl={getExplorerAddressUrl(network?.explorer)(token.poolAddress)}
77+
contractUrl={getExplorerAddressUrl(network?.explorer, network?.chainType)(token.poolAddress)}
7778
address={token.poolAddress}
7879
/>
7980
</div>

src/components/CCIP/Drawer/TokenDrawer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ function TokenDrawer({
131131
name: network.name,
132132
logo: network.logo,
133133
explorer: network.explorer,
134+
chainType: network.chainType,
134135
}}
135136
/>
136137
<div className="ccip-table__drawer-container">

src/components/CCIP/Tables/ChainTable.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface TableProps {
3333
}
3434
key: string
3535
directory: SupportedChain
36+
chainType?: ChainType
3637
}[]
3738
explorer: ExplorerInfo
3839
}
@@ -156,7 +157,10 @@ function ChainTable({ lanes, explorer, sourceNetwork, environment }: TableProps)
156157
<Address
157158
address={inOutbound === LaneFilter.Outbound ? network.onRamp?.address : network.offRamp?.address}
158159
endLength={4}
159-
contractUrl={getExplorerAddressUrl(explorer)(
160+
contractUrl={getExplorerAddressUrl(
161+
explorer,
162+
inOutbound === LaneFilter.Outbound ? sourceNetwork.chainType : network.chainType
163+
)(
160164
(inOutbound === LaneFilter.Outbound ? network.onRamp?.address : network.offRamp?.address) || ""
161165
)}
162166
/>

src/components/VersionSelector/base/VersionSelector.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ const { product, currentPath, enableEnhanced = true } = Astro.props
1717
1818
// Support multiple path patterns for version detection
1919
const standardPathMatch = currentPath.match(new RegExp(`/${product}/api-reference/(v[^/]+)`))
20-
const extendedPathMatch = currentPath.match(new RegExp(`/${product}/api-reference/(?:evm|svm)/(v[^/]+)`))
20+
const extendedPathMatch = currentPath.match(new RegExp(`/${product}/api-reference/(?:evm|svm|aptos)/(v[^/]+)`))
2121
let pathVersion = extendedPathMatch?.[1] || standardPathMatch?.[1]
2222
2323
// Extract VM type from the path (for CCIP)
2424
let vmType: string | undefined = undefined
2525
if (extendedPathMatch) {
26-
const vmTypeMatch = currentPath.match(new RegExp(`/${product}/api-reference/(evm|svm)/`))
26+
const vmTypeMatch = currentPath.match(new RegExp(`/${product}/api-reference/(evm|svm|aptos)/`))
2727
vmType = vmTypeMatch?.[1]
2828
}
2929

src/components/VersionSelector/base/VersionSelectorClient.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const VersionSelectorClient = <T extends string>({
104104
// 2. Extended: /{product}/api-reference/{vm_type}/v{version}/{page}
105105
const standardPathMatch = currentPath.match(new RegExp(`/${config.product.name}/api-reference/v[^/]+/(.+?)/?$`))
106106
const extendedPathMatch = currentPath.match(
107-
new RegExp(`/${config.product.name}/api-reference/(?:evm|svm)/v[^/]+/(.+?)/?$`)
107+
new RegExp(`/${config.product.name}/api-reference/(?:evm|svm|aptos)/v[^/]+/(.+?)/?$`)
108108
)
109109

110110
const pagePath = extendedPathMatch?.[1] || standardPathMatch?.[1]

0 commit comments

Comments
 (0)