Skip to content

Commit c91c244

Browse files
aelmanaakhadnithedriftofwords
authored
pools 1 5 1 (#2203)
* update * update * update * update * update * update * update * update * token pool upgradability * cct token decimals * cct - OZ Access control * update tasks * cct hardhat guides update 1 * EOA Foundry * update * update * changelog * changelog * update * Foundry Pool Rate Limites guide * update * rollback OZ change * update * Apply suggestions from code review Co-authored-by: Crystal Gomes <thedriftofwords@users.noreply.github.com> * update * Foundry - maxSupply fix * update * update --------- Co-authored-by: Karim <98668332+khadni@users.noreply.github.com> Co-authored-by: Crystal Gomes <thedriftofwords@users.noreply.github.com>
1 parent 7382360 commit c91c244

File tree

98 files changed

+6173
-1400
lines changed

Some content is hidden

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

98 files changed

+6173
-1400
lines changed

astro.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import rehypeWrapAll from "rehype-wrap-all"
99
import sitemap from "@astrojs/sitemap"
1010
import { RehypePlugins } from "@astrojs/markdown-remark"
1111
import yaml from "@rollup/plugin-yaml"
12+
import { ccipRedirects } from "./src/config/redirects/ccip"
1213

1314
// https://astro.build/config
1415
export default defineConfig({
@@ -18,6 +19,7 @@ export default defineConfig({
1819
"/ccip/supported-networks": "/ccip/directory/mainnet",
1920
"/getting-started": "/getting-started/conceptual-overview",
2021
"/resources": "/resources/link-token-contracts",
22+
...ccipRedirects,
2123
},
2224
integrations: [
2325
preact({

package-lock.json

Lines changed: 62 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@astrojs/sitemap": "^3.1.6",
4343
"@astrojs/vercel": "^7.8.0",
4444
"@chainlink/contracts": "1.2.0",
45-
"@chainlink/contracts-ccip": "1.5.0",
45+
"@chainlink/contracts-ccip": "1.5.1-beta.0",
4646
"@chainlink/design-system": "^0.2.8",
4747
"@chainlink/local": "^0.2.2",
4848
"@chainlink/solana-sdk": "^0.2.2",

public/changelog.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
[
2+
{
3+
"category": "release",
4+
"changes": [],
5+
"date": "2024-12-04",
6+
"description": "Chainlink CCIP 1.5.1 is now available, introducing several significant enhancements for cross-chain token pool management.\n\n**Enhanced Token Support:**\n- Added support for tokens with different decimals across chains\n- New BurnMintERC20 contract for easy token deployment and cross-chain expansion with configurable decimals and max supply\n\n**Improved Token Pool Management:**\n- Enhanced token pool upgrades to support multiple active pools simultaneously\n- Ensures in-flight messages remain deliverable during pool upgrades\n- Upgraded token pool access control from OwnerIsCreator to Ownable2StepMsgSender for better security\n\nFor detailed implementation guides and examples, visit our [Cross-Chain Token (CCT) documentation](https://docs.chain.link/ccip/concepts/cross-chain-tokens). For technical details and interfaces, see the [CCIP v1.5.1 API Reference](https://docs.chain.link/ccip/api-reference/v1.5.1).",
7+
"relatedNetworks": [],
8+
"relatedTokens": [],
9+
"title": "Chainlink CCIP 1.5.1",
10+
"topic": "ccip",
11+
"urls": []
12+
},
213
{
314
"category": "integration",
415
"changes": [],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.24;
3+
4+
// solhint-disable no-unused-import
5+
import {BurnMintERC677} from "@chainlink/contracts-ccip/src/v0.8/shared/token/ERC677/BurnMintERC677.sol";
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
.versionSelector {
2+
--select-height: 2.5rem;
3+
--select-padding: 0.75rem;
4+
--border-radius: var(--border-radius-primary, 6px);
5+
6+
margin: clamp(1rem, 2vw, 1.5rem) 0;
7+
padding: clamp(1rem, 2vw, 1.5rem);
8+
border-bottom: 1px solid var(--theme-divider);
9+
transition: all 0.2s ease;
10+
}
11+
12+
.selectWrapper {
13+
display: flex;
14+
align-items: center;
15+
gap: 1rem;
16+
flex-wrap: wrap;
17+
}
18+
19+
.label {
20+
font-weight: 600;
21+
font-size: clamp(0.875rem, 1.5vw, 1rem);
22+
color: var(--theme-text);
23+
white-space: nowrap;
24+
}
25+
26+
.selectContainer {
27+
position: relative;
28+
min-width: 150px;
29+
flex: 1;
30+
max-width: 300px;
31+
}
32+
33+
.select {
34+
appearance: none;
35+
width: 100%;
36+
height: var(--select-height);
37+
padding: 0 var(--select-padding);
38+
padding-right: calc(var(--select-padding) * 2.5);
39+
border: 2px solid var(--blue-600);
40+
border-radius: var(--border-radius);
41+
background: var(--theme-bg);
42+
color: var(--theme-text);
43+
font-size: clamp(0.875rem, 1.5vw, 1rem);
44+
cursor: pointer;
45+
transition: all 0.2s ease;
46+
}
47+
48+
.select:hover {
49+
background-color: var(--blue-600);
50+
color: var(--white);
51+
}
52+
53+
.select:focus {
54+
outline: none;
55+
border-color: var(--blue-600);
56+
box-shadow: 0 0 0 3px hsla(var(--color-blue), var(--theme-accent-opacity));
57+
}
58+
59+
.selectIcon {
60+
position: absolute;
61+
right: var(--select-padding);
62+
top: 50%;
63+
transform: translateY(-50%);
64+
width: 10px;
65+
height: 10px;
66+
border: 2px solid var(--theme-text);
67+
border-left: 0;
68+
border-top: 0;
69+
pointer-events: none;
70+
transform: translateY(-75%) rotate(45deg);
71+
}
72+
73+
.warning {
74+
margin-top: 1rem;
75+
padding: clamp(0.75rem, 2vw, 1rem);
76+
background: #fff3cd;
77+
border: 1px solid #ffeeba;
78+
border-radius: var(--border-radius);
79+
display: flex;
80+
align-items: flex-start;
81+
gap: 0.75rem;
82+
animation: slideIn 0.3s ease;
83+
}
84+
85+
.warningIcon {
86+
flex-shrink: 0;
87+
width: 20px;
88+
height: 20px;
89+
background: #856404;
90+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 16h2v2h-2zm0-6h2v4h-2z'/%3E%3C/svg%3E")
91+
center/contain no-repeat;
92+
}
93+
94+
.warningText {
95+
margin: 0;
96+
font-size: clamp(0.813rem, 1.5vw, 0.938rem);
97+
line-height: 1.5;
98+
color: #856404;
99+
}
100+
101+
.warningLink {
102+
color: #664d03;
103+
text-decoration: underline;
104+
font-weight: 500;
105+
transition: all 0.2s ease;
106+
}
107+
108+
.warningLink:hover {
109+
color: #533d02;
110+
text-decoration: none;
111+
}
112+
113+
/* Responsive adjustments */
114+
@media (max-width: 480px) {
115+
.selectWrapper {
116+
flex-direction: column;
117+
align-items: flex-start;
118+
gap: 0.5rem;
119+
}
120+
121+
.selectContainer {
122+
width: 100%;
123+
max-width: none;
124+
}
125+
}
126+
127+
/* Animation */
128+
@keyframes slideIn {
129+
from {
130+
opacity: 0;
131+
transform: translateY(-10px);
132+
}
133+
to {
134+
opacity: 1;
135+
transform: translateY(0);
136+
}
137+
}
138+
139+
/* Focus visible polyfill */
140+
.select:focus-visible {
141+
outline: none;
142+
border-color: var(--blue-600);
143+
box-shadow: 0 0 0 3px hsla(var(--color-blue), var(--theme-accent-opacity));
144+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { CCIP_VERSIONS, type CCIPVersion } from "@config/versions/ccip"
2+
import styles from "./VersionSelector.module.css"
3+
4+
type VersionSelectorProps = {
5+
currentVersion: CCIPVersion
6+
currentPath: string
7+
}
8+
9+
export const VersionSelector = ({ currentVersion, currentPath }: VersionSelectorProps): JSX.Element => {
10+
const pathAfterVersion = currentPath.split(currentVersion)[1] ?? ""
11+
12+
const handleVersionChange = (newVersion: CCIPVersion): void => {
13+
const newPath = `/ccip/api-reference/${newVersion}${pathAfterVersion}`
14+
window.location.href = newPath
15+
}
16+
17+
if (!CCIP_VERSIONS.ALL.includes(currentVersion)) {
18+
console.warn(`Invalid version ${currentVersion} provided to VersionSelector`)
19+
}
20+
21+
return (
22+
<div className={styles.versionSelector} role="region" aria-label="API Version Selector">
23+
<div className={styles.selectWrapper}>
24+
<label htmlFor="version-select" className={styles.label}>
25+
API Version:
26+
</label>
27+
<div className={styles.selectContainer}>
28+
<select
29+
id="version-select"
30+
value={currentVersion}
31+
onChange={({ target: { value } }) => handleVersionChange(value as CCIPVersion)}
32+
className={styles.select}
33+
aria-label="Select API Version"
34+
>
35+
{CCIP_VERSIONS.ALL.map((version) => (
36+
<option
37+
key={version}
38+
value={version}
39+
aria-label={`${version}${version === CCIP_VERSIONS.LATEST ? " - Latest Version" : ""}`}
40+
>
41+
{`${version}${version === CCIP_VERSIONS.LATEST ? " (Latest)" : ""}`}
42+
</option>
43+
))}
44+
</select>
45+
<span className={styles.selectIcon} aria-hidden="true" />
46+
</div>
47+
</div>
48+
49+
{currentVersion !== CCIP_VERSIONS.LATEST && (
50+
<div className={styles.warning} role="alert" aria-live="polite">
51+
<span className={styles.warningIcon} aria-hidden="true" />
52+
<p className={styles.warningText}>
53+
You are viewing documentation for {currentVersion}.{" "}
54+
<a href={`/ccip/api-reference/${CCIP_VERSIONS.LATEST}${pathAfterVersion}`} className={styles.warningLink}>
55+
Switch to latest ({CCIP_VERSIONS.LATEST})
56+
</a>
57+
</p>
58+
</div>
59+
)}
60+
</div>
61+
)
62+
}

0 commit comments

Comments
 (0)