Skip to content

Commit

Permalink
feat: add developer guides
Browse files Browse the repository at this point in the history
  • Loading branch information
phuctd95 committed Dec 8, 2024
1 parent 38dd20c commit c6e302c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
36 changes: 36 additions & 0 deletions docs/apps/ccip-bridge/guides/smart-contract-requirements.md
Original file line number Diff line number Diff line change
@@ -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

Check warning on line 12 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Token Administrator address requirement' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Token Administrator address requirement' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 12, "column": 4}}}, "severity": "WARNING"}

Check warning on line 12 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Token Administrator address requirement' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Token Administrator address requirement' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 12, "column": 4}}}, "severity": "WARNING"}

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

Check warning on line 23 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Burn & Mint Requirements' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Burn \u0026 Mint Requirements' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 23, "column": 5}}}, "severity": "WARNING"}

Check warning on line 23 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Burn & Mint Requirements' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Burn \u0026 Mint Requirements' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 23, "column": 5}}}, "severity": "WARNING"}
* 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.

Check failure on line 25 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 25, "column": 34}}}, "severity": "ERROR"}

Check failure on line 25 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 25, "column": 34}}}, "severity": "ERROR"}
* **burn(uint256 amount)** / **burn(address account, uint256 amount)**: This function is used to burn the amount of tokens on the source blockchain.

Check failure on line 26 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 26, "column": 17}}}, "severity": "ERROR"}

Check failure on line 26 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 26, "column": 61}}}, "severity": "ERROR"}

Check failure on line 26 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 26, "column": 17}}}, "severity": "ERROR"}

Check failure on line 26 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.AMPM] Use 'AM' or 'PM' (preceded by a space). Raw Output: {"message": "[Google.AMPM] Use 'AM' or 'PM' (preceded by a space).", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 26, "column": 61}}}, "severity": "ERROR"}
* **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.

Check warning on line 28 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 28, "column": 186}}}, "severity": "WARNING"}

Check warning on line 28 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 28, "column": 186}}}, "severity": "WARNING"}
### Lock & Mint Requirements

Check warning on line 29 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Lock & Mint Requirements' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Lock \u0026 Mint Requirements' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 29, "column": 5}}}, "severity": "WARNING"}

Check warning on line 29 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Headings] 'Lock & Mint Requirements' should use sentence-style capitalization. Raw Output: {"message": "[Google.Headings] 'Lock \u0026 Mint Requirements' should use sentence-style capitalization.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 29, "column": 5}}}, "severity": "WARNING"}
* 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.

Check warning on line 32 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 32, "column": 111}}}, "severity": "WARNING"}

Check warning on line 32 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 32, "column": 186}}}, "severity": "WARNING"}

Check warning on line 32 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 32, "column": 111}}}, "severity": "WARNING"}

Check warning on line 32 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 32, "column": 186}}}, "severity": "WARNING"}

:::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.

Check warning on line 35 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Colons] ': F' should be in lowercase. Raw Output: {"message": "[Google.Colons] ': F' should be in lowercase.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 35, "column": 40}}}, "severity": "WARNING"}

Check warning on line 35 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 35, "column": 754}}}, "severity": "WARNING"}

Check warning on line 35 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Colons] ': F' should be in lowercase. Raw Output: {"message": "[Google.Colons] ': F' should be in lowercase.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 35, "column": 40}}}, "severity": "WARNING"}

Check warning on line 35 in docs/apps/ccip-bridge/guides/smart-contract-requirements.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'preceding' instead of 'above'. Raw Output: {"message": "[Google.WordList] Use 'preceding' instead of 'above'.", "location": {"path": "docs/apps/ccip-bridge/guides/smart-contract-requirements.md", "range": {"start": {"line": 35, "column": 754}}}, "severity": "WARNING"}
:::
25 changes: 23 additions & 2 deletions docs/apps/ccip-bridge/overview.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
---
description: A dApp for bridging ERC-20 tokens and NFTs (non-fungible tokens) (coming soon) between the Ronin chain and others chain.
description: A secure interoperability protocol for enabling token transfers across blockchains
slug: /apps/ccip-bridge
title: CCIP Bridge
---

## Overview

CCIP Bridge ([app.roninchain.com/ccip-bridge](https://app.roninchain.com/ccip-bridge)) is an app for bridging ERC-20 tokens and NFTs (non-fungible tokens) (coming soon) between the Ronin chain and others chain.
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.

Check warning on line 34 in docs/apps/ccip-bridge/overview.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'capability' or 'feature' instead of 'functionality'. Raw Output: {"message": "[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.", "location": {"path": "docs/apps/ccip-bridge/overview.md", "range": {"start": {"line": 34, "column": 176}}}, "severity": "WARNING"}

Check warning on line 34 in docs/apps/ccip-bridge/overview.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'capability' or 'feature' instead of 'functionality'. Raw Output: {"message": "[Google.WordList] Use 'capability' or 'feature' instead of 'functionality'.", "location": {"path": "docs/apps/ccip-bridge/overview.md", "range": {"start": {"line": 34, "column": 176}}}, "severity": "WARNING"}
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ const sidebars = {
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
Expand Down

0 comments on commit c6e302c

Please sign in to comment.