Skip to content

Commit

Permalink
fix: redirect and v1 upgrades (#1161)
Browse files Browse the repository at this point in the history
Co-authored-by: dharamveergit <dharamveersingh.em@gmail.com>
Co-authored-by: Stephen Fluin <stephen.fluin@gmail.com>
  • Loading branch information
3 people committed Sep 20, 2024
1 parent 385518a commit 3073ea1
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 2 deletions.
171 changes: 171 additions & 0 deletions src/components/interchain-token-intro.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
import Section from "../layouts/Section.astro";
import { Callout } from "./callout";
const title = "Interchain Tokens and the Interchain Token Service";
const cards = [
{
title: "Create a new Interchain Token",
description:
"Register and create new Interchain Token(s) using the Interchain Token Portal, or create custom Interchain Tokens.",
url: "/dev/send-tokens/interchain-tokens/quick-start/no-code/",
},
{
title: "Programmatically create a new Interchain Token",
description: "Create new Interchain Tokens using code.",
url: "/dev/send-tokens/interchain-tokens/quick-start/programmatic/",
},
{
title: "Make an existing ERC-20 token an Interchain Token",
description:
"Upgrade existing tokens to canonical tokens, or link tokens deployed on multiple chains into Interchain Tokens.",
url: "/dev/send-tokens/interchain-tokens/quick-start/programmatic/#integrate-an-existing-custom-token-with-its",
},
{
title: "Check out the Interchain Portal",
description:
"Create your own Interchain Token with one click on the Interchain Portal.",
url: "http://interchain.axelar.dev/",
},
];
---


<Callout type="warning" emoji="">
The <a href="https://github.com/axelarnetwork/axelar-configs/blob/main/cli/wizard/commands/list-squid-token/README.md">Token Whitelisting for Squid Router form</a> is now live! Download
the <a href="https://github.com/axelarnetwork/axelar-configs">axelar-configs</a> repo, install dependencies, and `npm run wizard` on the command line to
access the interactive form through the wizard.
</Callout>

<h1>{title}</h1>

Web3 has gone cross-chain, with assets bridging between blockchains and
developers deploying applications on multiple chains. However, connecting tokens
that are deployed on multiple chains has always been a cumbersome process.

<br />
<br />

Interchain Tokens go beyond legacy bridges. The <a
href="https://axelar.network/interchaintokens"
>Interchain Token Service (ITS)</a
> allows ERC-20 tokens to be available on multiple blockchains. It preserves native
token qualities while allowing you to easily manage token features and token supply.
Interchain Tokens run on <a href="https://github.com/axelarnetwork/interchain-token-service/tree/main">open-source code</a> via smart contracts on a public blockchain
secured by a dynamic validator set. With ITS, you can have multiple blockchains
with canonical versions of your token that all share a single EVM address.

<br />
<br />

You can either create new <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interchain-token/InterchainToken.sol#L19">Interchain Tokens</a> from scratch or update tokens that
already exist on a <a href="/resources/contract-addresses/mainnet/"
>supported blockchain</a
>.



<h3>Key ITS Contract addresses</h3>
Interchain Token Service: <a href="https://etherscan.io/address/0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C">0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C</a>
<br/>
Interchain Token Factory: <a href="https://etherscan.io/address/0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66">0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66</a>



<style>
.card-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-column-gap: 16px;
grid-row-gap: 16px;
grid-auto-flow: row;
margin-top: 32px;
}
.card {
padding: 16px;
border: 1px solid rgb(229, 231, 235);
border-radius: 4px;
margin-right: 16px;
display: flex;
flex-direction: column;
color: inherit;
}
.card:hover {
box-shadow: 0 0 10px #ddd;
color: inherit;
}
.card div:nth-child(1) {
font-weight: bold;
display: flex;
align-items: center;
}
.card div:nth-child(2) {
flex-grow: 1;
}
.card span {
color: #1b62d6;
}

@media (max-width: 768px) {
.card-grid {
display: flex;
flex-direction: column;
}
}
</style>

<div class="card-grid">
{
cards.map((card) => (
<a class="card" href={card.url}>
<div>
<Fragment set:html={card?.icon} /> {card.title}
</div>
<div>{card.description}</div>
<span>
Get Started{" "}
<svg
stroke="currentColor"
fill="currentColor"
stroke-width="0"
viewBox="0 0 20 20"
class="mt-0.5"
height="16"
width="16"
xmlns="http://www.w3.org/2000/svg"
style="vertical-align:middle;"
>
<path
fill-rule="evenodd"
d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
clip-rule="evenodd"
/>
</svg>
</span>
</a>
))
}
</div>
<h1>ITS Overview</h1>
<p>The main functionalities of ITS can be broken down in the diagrams below. These are the ability to connect tokens across multiple blockchains and transfer connected tokens between multiple blockchains. Note: ITS is designed to be a flexible permisionless process, meaning that the way tokens are connected between the chains can vary for different usecases (see <a href="/dev/send-tokens/interchain-tokens/token-manager/">token managers</a> for more info).</p>
<h2>Deploy Interchain Token</h2>
<p>ITS allows you to deploy <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interchain-token/InterchainToken.sol">Interchain Tokens</a>. An Interchain Token is an ERC20 that is connected to <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/InterchainTokenService.sol">ITS</a> upon deployment. It comes built in with the <code>interchainTransfer()</code> function, which allows users to bridge their token between any blockchain which it is deployed to. To deploy this token you can go through the <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/InterchainTokenFactory.sol">Interchain Token Factory</a> contract. When you trigger the <code>registerCanonicalInterchainToken()</code> function that will trigger the flow of registering your custom token with a <code>Lock/Unlock</code> <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/token-manager/TokenManager.sol"> token manager</a> type to your token's <i>home chain</i>. Now that you have registered your token on the home chain you can call the <code>deployRemoteCanonicalInterchainToken()</code>. This will deploy an Interchain Token on a different blockchain that will be connected to your canonical token on the home chain you registered when you called the previous function. Note: This is just one of many different flows you can choose to follow when interacting with ITS.</p>
<Callout type="warning">This diagram is interactive click on the function names!</Callout>
<object type="image/svg+xml" data="/images/its-deployment-diagram.svg" style="width: 100%; height: 1200px;">
Your browser does not support SVG
</object>
<h2>Interchain Transfer</h2>
<p>Once your token is connected to ITS you can call the <code>interchaintTransfer()</code> function to send a cross chain transaction for your token. If your token inherits the <a href="https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/interchain-token/InterchainTokenStandard.sol">Interchain Token Standard</a> then you will have this function built into the token. The <code>interchainTransfer()</code> will trigger a flow that will interact with <code>ITS</code> to either lock or burn your token on the source chain (depending on the Token Manager type) and then mint your token on the destination chain.</p>
<Callout type="warning">This diagram is interactive click on the function names!</Callout>
<object type="image/svg+xml" data="/images/its-transfer.svg" style="width: 100%; height: 1200px;">
Your browser does not support SVG
</object>
<Callout type="warning" emoji="🚨">
**NOTE:** The security of your token is limited to the security of the chains
it integrates with. Since blockchains can have different security practices,
we recommend doing due diligence on all chains your token will be deployed to.
</Callout>


5 changes: 5 additions & 0 deletions src/content/docs/dev/send-tokens/interchain-tokens/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

import InterchainTokenIntro from "../../../../../components/interchain-token-intro.astro";


<InterchainTokenIntro />
4 changes: 2 additions & 2 deletions src/layouts/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export const getNavigation = (section) => {
children: [
{
title: "v1.0",
href: "/resources/mainnet/upgrades/v10/",
href: "/resources/mainnet/upgrades/v1/",
},
{
title: "v0.35",
Expand Down Expand Up @@ -632,7 +632,7 @@ export const getNavigation = (section) => {
children: [
{
title: "v1.0",
href: "/resources/testnet/upgrades/v10/",
href: "/resources/testnet/upgrades/v1/",
},
{
title: "v0.35",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3073ea1

Please sign in to comment.