Skip to content

Commit

Permalink
pools 1 5 1 (#2203)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 7382360 commit c91c244
Show file tree
Hide file tree
Showing 98 changed files with 6,173 additions and 1,400 deletions.
2 changes: 2 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import rehypeWrapAll from "rehype-wrap-all"
import sitemap from "@astrojs/sitemap"
import { RehypePlugins } from "@astrojs/markdown-remark"
import yaml from "@rollup/plugin-yaml"
import { ccipRedirects } from "./src/config/redirects/ccip"

// https://astro.build/config
export default defineConfig({
Expand All @@ -18,6 +19,7 @@ export default defineConfig({
"/ccip/supported-networks": "/ccip/directory/mainnet",
"/getting-started": "/getting-started/conceptual-overview",
"/resources": "/resources/link-token-contracts",
...ccipRedirects,
},
integrations: [
preact({
Expand Down
66 changes: 62 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@astrojs/sitemap": "^3.1.6",
"@astrojs/vercel": "^7.8.0",
"@chainlink/contracts": "1.2.0",
"@chainlink/contracts-ccip": "1.5.0",
"@chainlink/contracts-ccip": "1.5.1-beta.0",
"@chainlink/design-system": "^0.2.8",
"@chainlink/local": "^0.2.2",
"@chainlink/solana-sdk": "^0.2.2",
Expand Down
11 changes: 11 additions & 0 deletions public/changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
[
{
"category": "release",
"changes": [],
"date": "2024-12-04",
"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).",
"relatedNetworks": [],
"relatedTokens": [],
"title": "Chainlink CCIP 1.5.1",
"topic": "ccip",
"urls": []
},
{
"category": "integration",
"changes": [],
Expand Down
5 changes: 5 additions & 0 deletions public/samples/CCIP/cct/TokenDependencies.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

// solhint-disable no-unused-import
import {BurnMintERC677} from "@chainlink/contracts-ccip/src/v0.8/shared/token/ERC677/BurnMintERC677.sol";
144 changes: 144 additions & 0 deletions src/components/CCIP/VersionSelector/VersionSelector.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
.versionSelector {
--select-height: 2.5rem;
--select-padding: 0.75rem;
--border-radius: var(--border-radius-primary, 6px);

margin: clamp(1rem, 2vw, 1.5rem) 0;
padding: clamp(1rem, 2vw, 1.5rem);
border-bottom: 1px solid var(--theme-divider);
transition: all 0.2s ease;
}

.selectWrapper {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}

.label {
font-weight: 600;
font-size: clamp(0.875rem, 1.5vw, 1rem);
color: var(--theme-text);
white-space: nowrap;
}

.selectContainer {
position: relative;
min-width: 150px;
flex: 1;
max-width: 300px;
}

.select {
appearance: none;
width: 100%;
height: var(--select-height);
padding: 0 var(--select-padding);
padding-right: calc(var(--select-padding) * 2.5);
border: 2px solid var(--blue-600);
border-radius: var(--border-radius);
background: var(--theme-bg);
color: var(--theme-text);
font-size: clamp(0.875rem, 1.5vw, 1rem);
cursor: pointer;
transition: all 0.2s ease;
}

.select:hover {
background-color: var(--blue-600);
color: var(--white);
}

.select:focus {
outline: none;
border-color: var(--blue-600);
box-shadow: 0 0 0 3px hsla(var(--color-blue), var(--theme-accent-opacity));
}

.selectIcon {
position: absolute;
right: var(--select-padding);
top: 50%;
transform: translateY(-50%);
width: 10px;
height: 10px;
border: 2px solid var(--theme-text);
border-left: 0;
border-top: 0;
pointer-events: none;
transform: translateY(-75%) rotate(45deg);
}

.warning {
margin-top: 1rem;
padding: clamp(0.75rem, 2vw, 1rem);
background: #fff3cd;
border: 1px solid #ffeeba;
border-radius: var(--border-radius);
display: flex;
align-items: flex-start;
gap: 0.75rem;
animation: slideIn 0.3s ease;
}

.warningIcon {
flex-shrink: 0;
width: 20px;
height: 20px;
background: #856404;
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")
center/contain no-repeat;
}

.warningText {
margin: 0;
font-size: clamp(0.813rem, 1.5vw, 0.938rem);
line-height: 1.5;
color: #856404;
}

.warningLink {
color: #664d03;
text-decoration: underline;
font-weight: 500;
transition: all 0.2s ease;
}

.warningLink:hover {
color: #533d02;
text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
.selectWrapper {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}

.selectContainer {
width: 100%;
max-width: none;
}
}

/* Animation */
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

/* Focus visible polyfill */
.select:focus-visible {
outline: none;
border-color: var(--blue-600);
box-shadow: 0 0 0 3px hsla(var(--color-blue), var(--theme-accent-opacity));
}
62 changes: 62 additions & 0 deletions src/components/CCIP/VersionSelector/VersionSelector.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { CCIP_VERSIONS, type CCIPVersion } from "@config/versions/ccip"
import styles from "./VersionSelector.module.css"

type VersionSelectorProps = {
currentVersion: CCIPVersion
currentPath: string
}

export const VersionSelector = ({ currentVersion, currentPath }: VersionSelectorProps): JSX.Element => {
const pathAfterVersion = currentPath.split(currentVersion)[1] ?? ""

const handleVersionChange = (newVersion: CCIPVersion): void => {
const newPath = `/ccip/api-reference/${newVersion}${pathAfterVersion}`
window.location.href = newPath
}

if (!CCIP_VERSIONS.ALL.includes(currentVersion)) {
console.warn(`Invalid version ${currentVersion} provided to VersionSelector`)
}

return (
<div className={styles.versionSelector} role="region" aria-label="API Version Selector">
<div className={styles.selectWrapper}>
<label htmlFor="version-select" className={styles.label}>
API Version:
</label>
<div className={styles.selectContainer}>
<select
id="version-select"
value={currentVersion}
onChange={({ target: { value } }) => handleVersionChange(value as CCIPVersion)}
className={styles.select}
aria-label="Select API Version"
>
{CCIP_VERSIONS.ALL.map((version) => (
<option
key={version}
value={version}
aria-label={`${version}${version === CCIP_VERSIONS.LATEST ? " - Latest Version" : ""}`}
>
{`${version}${version === CCIP_VERSIONS.LATEST ? " (Latest)" : ""}`}
</option>
))}
</select>
<span className={styles.selectIcon} aria-hidden="true" />
</div>
</div>

{currentVersion !== CCIP_VERSIONS.LATEST && (
<div className={styles.warning} role="alert" aria-live="polite">
<span className={styles.warningIcon} aria-hidden="true" />
<p className={styles.warningText}>
You are viewing documentation for {currentVersion}.{" "}
<a href={`/ccip/api-reference/${CCIP_VERSIONS.LATEST}${pathAfterVersion}`} className={styles.warningLink}>
Switch to latest ({CCIP_VERSIONS.LATEST})
</a>
</p>
</div>
)}
</div>
)
}
Loading

0 comments on commit c91c244

Please sign in to comment.