Skip to content

Commit

Permalink
feat: its docs update (#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin852 authored Sep 3, 2024
1 parent a7029b7 commit e203d5c
Show file tree
Hide file tree
Showing 15 changed files with 339 additions and 288 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ These links redirect to pages in the documentation whose slugs may otherwise be
### ITS

- **Introduction:** https://docs.axelar.dev/its/intro
- **Create Token:** https://docs.axelar.dev/its/create-token
- **Quickstart:** https://docs.axelar.dev/its/create-token
- **Upgrade Token:** https://docs.axelar.dev/its/upgrade-token
- **Interchain Token Executable:** https://docs.axelar.dev/its/token-executable
- **Rate Limit:** https://docs.axelar.dev/its/rate-limit
- **Flow Limit:** https://docs.axelar.dev/its/flow-limit
- **Programmatically Create a Token:** https://docs.axelar.dev/its/create-token-tutorial
- **Programmatically Create a Canonical Token:** https://docs.axelar.dev/its/canonical-token-tutorial
- **Link Custom Tokens into Interchain Tokens:** https://docs.axelar.dev/its/link-token-tutorial
2 changes: 1 addition & 1 deletion public/images/its-deployment-diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/images/its-transfer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions src/layouts/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,30 @@ export const getNavigation = (section) => {
href: "/dev/send-tokens/interchain-tokens/intro/",
},
{
title: "Create Token",
href: "/dev/send-tokens/interchain-tokens/create-token/",
title: "Quick Start",
href: "/dev/send-tokens/interchain-tokens/quick-start/",
children: [
{
title: "No Code",
href: "/dev/send-tokens/interchain-tokens/quick-start/no-code/"
},
{
title: "Programmatic",
href: "/dev/send-tokens/interchain-tokens/quick-start/programmatic/"
}
]
},
{
title: "Upgrade Token",
href: "/dev/send-tokens/interchain-tokens/upgrade-tokens/",
title: "Token Manager",
href: "/dev/send-tokens/interchain-tokens/token-manager/",
},
{
title: "Interchain Token Executable",
href: "/dev/send-tokens/interchain-tokens/interchain-token-executable/",
},
{
title: "Rate Limit",
href: "/dev/send-tokens/interchain-tokens/rate-limit/",
title: "Flow Limit",
href: "/dev/send-tokens/interchain-tokens/flow-limit/",
},
{
title: "Developer Guides",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dev/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can then use [Axelarscan](/dev/intro/#check-interchain-transactions), Axelar
### Send tokens across chains

* [Send tokens between different blockchains](/dev/send-tokens/introduction/)
* [Rate limit for sending tokens across chains](/dev/send-tokens/interchain-tokens/rate-limit/)
* [Flow limit for sending tokens across chains](/dev/send-tokens/interchain-tokens/flow-limit/)

### Pass messages between chains

Expand Down
81 changes: 0 additions & 81 deletions src/pages/dev/send-tokens/interchain-tokens/create-token.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In this tutorial, you will:
You will need:

- A basic understanding of [Solidity](https://www.tutorialspoint.com/solidity/index.htm) and [JavaScript](https://www.w3schools.com/js/)
-[wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Mumbai faucets ([1](https://faucet.polygon.technology/)[2](https://mumbaifaucet.com/)).
-[wallet](https://metamask.io/) with FTM and MATIC funds for testing. If you don’t have these funds, you can get FTM from the [Fantom faucet](https://faucet.fantom.network/) and MATIC from the Polygon faucets ([1](https://faucet.polygon.technology/)[2](https://www.alchemy.com/faucets/polygon-amoy)).

## Deploy an ERC-20 token on the Fantom and Polygon testnets

Expand Down Expand Up @@ -99,7 +99,7 @@ Next, set up the ABIs for the [Interchain Token Service](https://github.com/axel
Create a folder named `utils`. Inside the folder, create the following new files and add the respective ABIs:

- Add the [Interchain Token Service ABI](https://gist.github.com/Olanetsoft/2a632784e6753d34ca7ffc4f73bf58ed) to `interchainTokenServiceABI.json`.
- Add your custom token ABI to `customTokenABI**.**json`. You can get this from [FTMScan](https://testnet.ftmscan.com/) or [PolygonScan](https://mumbai.polygonscan.com/) with the address of your deployed token if your contract is verified. Otherwise, you can get it from the same service you deployed the `SimpleCustomToken` on.
- Add your custom token ABI to `customTokenABI**.**json`. You can get this from [FTMScan](https://testnet.ftmscan.com/) or [PolygonScan](https://amoy.polygonscan.com/) with the address of your deployed token if your contract is verified. Otherwise, you can get it from the same service you deployed the `SimpleCustomToken` on.

## Set up an RPC for the local chain

Expand Down Expand Up @@ -144,7 +144,7 @@ module.exports = {
accounts: [PRIVATE_KEY],
},
polygon: {
url: "https://rpc.ankr.com/polygon_mumbai",
url: "https://polygon-amoy.drpc.org ",
chainId: 80001,
accounts: [PRIVATE_KEY],
},
Expand Down Expand Up @@ -354,7 +354,7 @@ async function gasEstimator() {

### Perform remote token manager deployment

Create a `deployRemoteTokenManager()` function. This will deploy the remote Token Manager on the Polygon Mumbai testnet. Make sure to change the salts to the value you saved from a previous step.
Create a `deployRemoteTokenManager()` function. This will deploy the remote Token Manager on the Polygon testnet. Make sure to change the salts to the value you saved from a previous step.

```JavaScript
//...
Expand Down Expand Up @@ -456,7 +456,7 @@ When deploying the token manager to a preferred chain other than the local chain

### Check the transaction on the Axelar testnet scanner

Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully deployed the remote token manager on the Polygon Mumbai testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0x5dbba37f7741d19ca872bb4b2a29523baa002a3d6f0f31834bc34d6d6ca633f5).
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully deployed the remote token manager on the Polygon testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0x5dbba37f7741d19ca872bb4b2a29523baa002a3d6f0f31834bc34d6d6ca633f5).

Add gas if needed. Ensure that Axelar shows a successful transaction before continuing to the next step.

Expand Down Expand Up @@ -604,7 +604,7 @@ grantRoleTxn: 0xb3d4c9264faabe137595a9032b3958a07d24c308df5c8c3e45d711d7b9df448

### Check the transaction on the Polygon testnet scanner

Check the [Polygon testnet scanner](https://mumbai.polygonscan.com/) to see if you have successfully [transferred Mint access to the Token Manager address](https://mumbai.polygonscan.com/tx/0xb3d4c9264faabe137595a9032b3958a07d24c308df5c8c3e45d711d7b9df4488).
Check the [Polygon testnet scanner](https://amoy.polygonscan.com/) to see if you have successfully transferred Mint access to the Token Manager address.

## Transfer your token between chains

Expand Down Expand Up @@ -686,7 +686,7 @@ If you see this, it means that your interchain transfer has been successful!

### Check the transaction on the Axelar testnet scanner

Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully transferred SCT from the [Fantom testnet](https://testnet.ftmscan.com/token/0x8D4a6B2A784749BBc412A41C1440C5A67EAB57EE) to the [Polygon testnet](https://mumbai.polygonscan.com/token/0x7884ac325fa7aedB8A4d7bBD92671e8699f49108). It should look something like [this](https://testnet.axelarscan.io/gmp/0x65258117e8133397b047a6192cf69a1b48f59b0cb806be1c0fa5a7c1efd747ef).
Check the [Axelarscan testnet scanner](https://testnet.axelarscan.io/) to see if you have successfully transferred SCT from the [Fantom testnet](https://testnet.ftmscan.com/token/0x8D4a6B2A784749BBc412A41C1440C5A67EAB57EE) to the Polygon testnet. It should look something like [this](https://testnet.axelarscan.io/gmp/0x65258117e8133397b047a6192cf69a1b48f59b0cb806be1c0fa5a7c1efd747ef).

## Congratulations!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Programmatically Create a New Token Using the Interchain Token Service

[Interchain Tokens](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interchain-token/InterchainToken.sol) are created and managed by Axelar’s new [Interchain Token Service](https://github.com/axelarnetwork/interchain-token-service/tree/main), which uses Axelar’s communication protocols to send tokens cross-chain. With it, you can build your own asset bridges, build asset transfers into your interchain dApp, and [take on many other use cases](https://community.axelar.network/t/expanding-the-axelar-ecosystem-ideas-for-infrastructure-projects/2583/2).
[Interchain Tokens](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interchain-token/InterchainToken.sol) are created and managed by Axelar’s [Interchain Token Service](https://github.com/axelarnetwork/interchain-token-service/tree/main), which uses [GMP messages](https://docs.axelar.dev/dev/general-message-passing/overview) to send tokens cross-chain. With it, you can build your own asset bridges, build asset transfers into your interchain dApp, and [take on many other use cases](https://community.axelar.network/t/expanding-the-axelar-ecosystem-ideas-for-infrastructure-projects/2583/2).

The workflow can be summarized in three steps:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Rate Limit in Interchain Token Service
# Flow Limit in Interchain Token Service

## Overview

`FlowLimit` ensures the stability and security of interchain operations by setting constraints on the volume of tokens that can be transferred within a specified time frame. This prevents system abuse and overload, which is crucial in Interchain transfers. `FlowLimit` is managed by the [`FlowLimit` contract](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/utils/FlowLimit.sol), a core component of the [Interchain Token Service (ITS)](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/InterchainTokenService.sol) designed to regulate the flow of tokens across different blockchains.
A `FlowLimit` ensures the stability and security of interchain operations by setting constraints on the volume of tokens that can be transferred within a specified time frame. This prevents system abuse and overload, which is crucial in Interchain transfers, and can be used to prevent transfers of a token on a chain that is undergoing an emergency situation. Flow limits are managed by the [`FlowLimit` contract](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/utils/FlowLimit.sol).

The `FlowLimit` contract is [integrated](https://github.com/axelarnetwork/interchain-token-service/blob/0a00533f19197a285d6bddc8ec0c2e908094ebfe/contracts/InterchainTokenService.sol#L520) into the token manager contracts within the Interchain Token Service. These token managers, responsible for handling tokens before and after interchain transfers, utilize the `FlowLimit` functionalities to regulate token transfers and maintain system integrity.
The `FlowLimit` contract is [used by](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/token-manager/TokenManager.sol#L15) the [token manager contract](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/token-manager/TokenManager.sol#L21). These token managers, use the `FlowLimit` functionalities to set cross-chain transfer volume going in and out of a given blockchain.

This guide provides a comprehensive understanding of how the `FlowLimit` contract operates within the context of [Interchain](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/InterchainTokenService.sol) token transfers.
This guide provides a comprehensive understanding of how the `FlowLimit` contract operates within the context of [Interchain token transfers](https://github.com/axelarnetwork/interchain-token-service/blob/v1.0.0/contracts/InterchainTokenService.sol#L455).

## Core Aspects

Expand Down
Loading

0 comments on commit e203d5c

Please sign in to comment.