diff --git a/docs/apps/ccip-bridge/assets/step_1.png b/docs/apps/ccip-bridge/assets/step_1.png new file mode 100644 index 0000000..82c4ca2 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_1.png differ diff --git a/docs/apps/ccip-bridge/assets/step_2.png b/docs/apps/ccip-bridge/assets/step_2.png new file mode 100644 index 0000000..e046c91 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_2.png differ diff --git a/docs/apps/ccip-bridge/assets/step_3.png b/docs/apps/ccip-bridge/assets/step_3.png new file mode 100644 index 0000000..1b3d03c Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_3.png differ diff --git a/docs/apps/ccip-bridge/assets/step_4.png b/docs/apps/ccip-bridge/assets/step_4.png new file mode 100644 index 0000000..2d73188 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_4.png differ diff --git a/docs/apps/ccip-bridge/assets/step_5.png b/docs/apps/ccip-bridge/assets/step_5.png new file mode 100644 index 0000000..45ced88 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_5.png differ diff --git a/docs/apps/ccip-bridge/assets/step_6.png b/docs/apps/ccip-bridge/assets/step_6.png new file mode 100644 index 0000000..702efc6 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_6.png differ diff --git a/docs/apps/ccip-bridge/assets/step_7.png b/docs/apps/ccip-bridge/assets/step_7.png new file mode 100644 index 0000000..c1ef77b Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_7.png differ diff --git a/docs/apps/ccip-bridge/assets/step_8.png b/docs/apps/ccip-bridge/assets/step_8.png new file mode 100644 index 0000000..27c9146 Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_8.png differ diff --git a/docs/apps/ccip-bridge/assets/step_9.png b/docs/apps/ccip-bridge/assets/step_9.png new file mode 100644 index 0000000..d82af3f Binary files /dev/null and b/docs/apps/ccip-bridge/assets/step_9.png differ diff --git a/docs/apps/ccip-bridge/guides/smart-contract-requirements.md b/docs/apps/ccip-bridge/guides/smart-contract-requirements.md new file mode 100644 index 0000000..61ca468 --- /dev/null +++ b/docs/apps/ccip-bridge/guides/smart-contract-requirements.md @@ -0,0 +1,36 @@ +--- +description: Learn the token requirements to integrate with CCIP +slug: /apps/ccip-bridge/smart-contract-requirements +title: ERC-20 Smart Contract Requirements +toc_max_heading_level: 2 +--- + +## Overview + +Before enabling an ERC20-compatible token in CCIP, it's important to understand the requirements it must fulfill to integrate with CCIP. + +## Token Administrator address requirement + +The token contract must provide an easy way to obtain the token administrator address. This can be achieved if the token contract includes **one of the following functions**: + +* **owner()**: This function returns the token contract owner's address. **We recommend using this function.** +* **getCCIPAdmin()**: This function returns the token administrator's address if it differs from the contract owner's. + +## Requirements for CCIP token transfers + +The token's smart contract must meet minimum requirements to integrate with CCIP. + +### Burn & Mint Requirements +* The token smart contract must have the following functions: + * **mint(address account, uint256 amount)**: This function is used to mint the amount of tokens to a given **account** on the destination blockchain. + * **burn(uint256 amount)** / **burn(address account, uint256 amount)**: This function is used to burn the amount of tokens on the source blockchain. + * **decimals()**: Returns the token's number of decimals. +* On the source and destination blockchains, the token contract must support granting **mint and burn** permissions. The token issuers or another role (such as the token administrator) will grant these permissions to the token pool. +### Lock & Mint Requirements +* The token smart contract must have the following function: + * **decimals()**: Returns the token's number of decimals. +* On the destination blockchain, The token contract must support granting mint and burn permissions described above. The token issuers or another role (such as the token administrator) will grant these permissions to the token pool. + +:::info +**If you don't have an existing token**: For all blockchains where tokens need to be burned and minted (for example, the source or destination chain in the case of Burn and Mint, or the destination blockchain in the case of Lock and Mint), Chainlink provides a [BurnMintERC677](https://github.com/smartcontractkit/ccip/blob/ccip-develop/contracts/src/v0.8/shared/token/ERC677/BurnMintERC677.sol) contract that you can use to deploy your token in minutes. This token follows the [ERC677](https://github.com/ethereum/EIPs/issues/677) or [ERC777](https://ethereum.org/en/developers/docs/standards/tokens/erc-777/), allowing you to use it as-is or extend it to meet your specific requirements. You can also use a standard **ERC-20** as long as it meets the above specifications. +::: \ No newline at end of file diff --git a/docs/apps/ccip-bridge/guides/transfer-token.md b/docs/apps/ccip-bridge/guides/transfer-token.md new file mode 100644 index 0000000..1d02434 --- /dev/null +++ b/docs/apps/ccip-bridge/guides/transfer-token.md @@ -0,0 +1,58 @@ +--- +description: Bridge ERC-20 tokens from Ethereum to Ronin using Ronin Bridge. +slug: /apps/ccip-bridge/transfer-token +title: Transfer an ERC-20 token +--- + +## Overview + +This guide describes how to use CCIP Bridge to send an ERC-20 token from Ronin to Ethereum. + +## Prerequisites + +If you access CCIP Bridge on mobile, remember to import your Ethereum address to your mobile Ronin Wallet. To learn how to do that, see [Importing Your MetaMask Wallet to Ronin Wallet](https://support.roninchain.com/hc/en-us/articles/14862812718107-Importing-Your-MetaMask-Wallet-to-Ronin-Wallet). + +## Step 1. Choose source and destination chain + Go to https://app.roninchain.com/bridge, then select “Cross-chain bridge (CCIP)” tab + + ![step_1](../assets/step_1.png) + + Click “From" section, then select "Ronin" as the source chain + - You can also click the “Swap” button to switch between source network and destination network at “From" and "To" boxes. + + ![step_2](../assets/step_2.png) + + Select the connection method you want to use and connect your Ronin wallet + + ![step_3](../assets/step_3.png) + + Click “To" section and choose the destination chain: "Ethereum" + + ![step_4](../assets/step_4.png) + +## Step 2: Add the sender and recipient addresses + Enter the recipient address or paste the address by clicking the “Paste" button, then click "Confirm" button + - If the destination chain is Ronin, you can enter any RNS domain name that a wallet has. + + ![step_5](../assets/step_5.png) + +## Step 3: Choose the token and amount + Select the token and an amount you would like to transfer + + ![step_6](../assets/step_6.png) + +## Step 4: Choose fee token + Select the token you want to pay fee. Make sure you have enough token to pay fee. + + ![step_9](../assets/step_9.png) + +## Step 5: Excecute and receive the tokens in your wallet + Click “Transfer” button to execute the transaction + + ![step_7](../assets/step_7.png) + + When the transaction is complete, you’ll see the “Transfer complete" window + + ![step_8](../assets/step_8.png) + + diff --git a/docs/apps/ccip-bridge/overview.md b/docs/apps/ccip-bridge/overview.md new file mode 100644 index 0000000..e24992a --- /dev/null +++ b/docs/apps/ccip-bridge/overview.md @@ -0,0 +1,34 @@ +--- +description: A secure interoperability protocol for enabling token transfers across blockchains +slug: /apps/ccip-bridge +title: CCIP Bridge +--- + +## Overview + +The [Cross-Chain Interoperability Protocol (CCIP)](https://app.roninchain.com/ccip-bridge) is a protocol developed by Chainlink to enable secure and reliable communication and token transfers between different blockchain networks. It provides the technical infrastructure for cross-chain interactions, enabling developers to build decentralized applications (dApps) that operate across multiple blockchains. + + +## Features + +1. **Cross-Chain Connectivity** + Enables communication and token transfers between blockchain networks, including both public and private chains. + +2. **Decentralized Infrastructure** + Utilizes Chainlink's Decentralized Oracle Network to process and validate cross-chain messages, ensuring system reliability. + +3. **Token Transfers** + Supports secure movement of tokens between chains, allowing for interoperability between blockchain ecosystems. + +4. **Built-in Safeguards** + Includes security features such as rate limiting to mitigate risks associated with cross-chain interactions. + + +## User guides + +* [Transfer an ERC-20 token](./guides/transfer-token.md) + +## Developer guides + +* [Learn the token requirements to integrate with CCIP](./guides/smart-contract-requirements.md) +* Developers can access CCIP through [Chainlink's documentation and SDKs](https://docs.chain.link/ccip). The protocol provides tools and resources for integrating cross-chain functionality into dApps, with an emphasis on security and straightforward implementation. diff --git a/docs/get-started.mdx b/docs/get-started.mdx index 18afb0f..57e9ed8 100644 --- a/docs/get-started.mdx +++ b/docs/get-started.mdx @@ -29,6 +29,7 @@ Guides on using Ronin dApps (decentralized apps). =18.0" + "node": "20.x" }, "browserslist": { "production": [ diff --git a/sidebars.js b/sidebars.js index aa44888..8e9b227 100644 --- a/sidebars.js +++ b/sidebars.js @@ -91,7 +91,7 @@ const sidebars = { label: 'Ronin Name Service', link: { type: 'doc', - id: 'apps/rns/overview', + id: 'apps/rns/overview', }, items: [ { @@ -125,7 +125,7 @@ const sidebars = { label: 'Ronin Bridge', link: { type: 'doc', - id: 'apps/ronin-bridge/overview', + id: 'apps/ronin-bridge/overview', }, items: [ // Deposit ERC-20 tokens @@ -138,7 +138,22 @@ const sidebars = { 'apps/ronin-bridge/guides/withdraw-nft', // Token withdrawal limits 'apps/ronin-bridge/reference/withdrawal-limits', - ] + ], + }, + // CCIP Bridge + { + type: 'category', + label: 'CCIP Bridge', + link: { + type: 'doc', + id: 'apps/ccip-bridge/overview', + }, + items: [ + // Transfer ERC-20 tokens + 'apps/ccip-bridge/guides/transfer-token', + // Learn the token requirements to integrate with CCIP + 'apps/ccip-bridge/guides/smart-contract-requirements', + ], }, // Katana { @@ -146,7 +161,7 @@ const sidebars = { label: 'Katana', link: { type: 'doc', - id: 'apps/katana/overview', + id: 'apps/katana/overview', }, items: [ // Swap tokens @@ -158,7 +173,7 @@ const sidebars = { link: { type: 'generated-index', description: 'Guides for creating and managing liquidity pools.', - slug: 'apps/katana/pools' + slug: 'apps/katana/pools', }, items: [ // Create a liquidity pool @@ -205,12 +220,9 @@ const sidebars = { link: { type: 'generated-index', slug: '/rpc', - description: 'Guides for setting up and using an RPC node.', + description: 'Guides for setting up and using an RPC node.', }, - items: [ - 'rpc/mainnet-rpc', - 'rpc/testnet-rpc', - ], + items: ['rpc/mainnet-rpc', 'rpc/testnet-rpc'], }, // Delegators { @@ -218,7 +230,7 @@ const sidebars = { label: 'Delegators', link: { type: 'doc', - id: 'delegators/index', + id: 'delegators/index', }, items: [ // Stake RON @@ -239,7 +251,7 @@ const sidebars = { label: 'Validators', link: { type: 'doc', - id: 'validators/index', + id: 'validators/index', }, items: [ { @@ -247,7 +259,7 @@ const sidebars = { label: 'Setup', link: { type: 'doc', - id: 'validators/setup/overview', + id: 'validators/setup/overview', }, items: [ { @@ -256,7 +268,7 @@ const sidebars = { link: { type: 'generated-index', slug: '/validators/setup/mainnet', - description: 'Node installation guides for the Ronin mainnet.' + description: 'Node installation guides for the Ronin mainnet.', }, items: [ // Run a validator and bridge together @@ -321,8 +333,9 @@ const sidebars = { label: 'Manage validator account', link: { type: 'generated-index', - title: 'Manage your validator account', - description: 'Guides for increasing or withdrawing your stake, claiming rewards, and managing your validator account.', + title: 'Manage your validator account', + description: + 'Guides for increasing or withdrawing your stake, claiming rewards, and managing your validator account.', slug: '/validators/manage', }, items: [ @@ -362,7 +375,7 @@ const sidebars = { label: 'Governance', link: { type: 'doc', - id: 'validators/governance/overview', + id: 'validators/governance/overview', }, items: [ // Create and vote on proposals @@ -378,7 +391,7 @@ const sidebars = { label: 'Bridge operators', link: { type: 'doc', - id: 'bridge-operators/index', + id: 'bridge-operators/index', }, items: [ { @@ -386,12 +399,9 @@ const sidebars = { label: 'Setup', link: { type: 'doc', - id: 'bridge-operators/setup/overview', + id: 'bridge-operators/setup/overview', }, - items: [ - 'bridge-operators/setup/run-bridge', - 'bridge-operators/setup/upgrade-bridge', - ], + items: ['bridge-operators/setup/run-bridge', 'bridge-operators/setup/upgrade-bridge'], }, // Slashing 'bridge-operators/slashing', @@ -401,7 +411,7 @@ const sidebars = { label: 'Governance', link: { type: 'doc', - id: 'bridge-operators/governance/overview', + id: 'bridge-operators/governance/overview', }, items: [ // Create and vote on proposals