Skip to content

Commit

Permalink
fix: add interchain trust notice (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffe9f8 authored Jan 19, 2024
1 parent 6280c96 commit 471975e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/pages/dev/general-message-passing/gmp-messages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ To call a contract on chain B from chain A, the user needs to call `callContract
- The destination contract address, which must inherit from `AxelarExecutable` defined in [AxelarExecutable.sol](https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/executable/AxelarExecutable.sol).
- The payload `bytes` to pass to the destination contract.

<Callout emoji="🚨">
**NOTE:** The security of your contracts is limited to the security of the chains they integrate with. Since blockchains can have different security practices, we recommend doing due diligence on all chains your contract will be deployed to.
</Callout>

If you want to try this out directly on the blockchain, you can [use Remix to try out Axelar's GMP](https://remix.ethereum.org/axelarnetwork/axelar-docs/blob/main/public/samples/gmp-senderreceiver.sol).

```solidity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ To call chain B from chain A and send some tokens along the way, the user needs
- The symbol of the token to transfer, which must be a supported asset ([Mainnet](../reference/mainnet-contract-addresses) | [Testnet](../reference/testnet-contract-addresses)).
- The amount of the token to transfer.

<Callout emoji="🚨">
**NOTE:** The security of your contracts, and the tokens passed between them, is limited to the security of the chains they integrate with. Since blockchains can have different security practices, we recommend doing due diligence on all chains your contract will be deployed to.
</Callout>

As per the snippet below:

```solidity
Expand Down
6 changes: 6 additions & 0 deletions src/pages/dev/general-message-passing/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# General Message Passing

import { Callout } from "/src/components/callout";

Axelar's General Message Passing (GMP) enables a developer building on one chain to call any function on any other connected chain. (We use the word "function" to encompass both smart contracts at the application layer and functions built at the protocol layer, as in Cosmos, for example.) That means complete composability across Web3.

With GMP, you can:

- Call a contract on chain B from chain A.
- Call a contract on chain B from chain A and attach some tokens.

<Callout emoji="🚨">
**NOTE:** The security of your contracts is limited to the security of the chains they integrate with. Since blockchains can have different security practices, we recommend doing due diligence on all chains your contract will be deployed to.
</Callout>

### Prerequisites
- For GMP to work, chains A and B must be EVM or Cosmos with a deployed Axelar Gateway contract. We're adding new chains and chain technology stacks all of the time. This document primarily focuses on EVM chains and Solidity code, but you can [learn about interacting with Cosmos GMP](./cosmos-gmp).
- The application's executable contract must be deployed on the destination contract.
Expand Down
8 changes: 6 additions & 2 deletions src/pages/dev/send-tokens/interchain-tokens/create-token.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Create a New Interchain Token

import { Callout } from '../../../../components/callout'
import { Callout } from "/src/components/callout";

Interchain tokens are ERC-20 tokens that are available on [multiple blockchains](https://docs.axelar.dev/resources/testnet). They are created using the [Interchain Token Service](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/InterchainTokenService.sol) and can be used to transfer value between blockchains.

The Interchain Token Service is deployed to [`0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C`](https://etherscan.io/address/0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C) while the Interchain Token Factory is deployed to [`0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66`](https://etherscan.io/address/0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66).

You can create a new Interchain Token through the [Interchain Portal](https://testnet.interchain.axelar.dev/), or by building a custom ERC-20 token and deploying it with a Mint/Burn token manager on all chains. These tokens will be accessible on multiple chains, allowing for seamless interaction on each chain by utilizing familiar methods such as send, transfer, and approve -- just as with any standard ERC-20 token.

<Callout emoji="💡">Make sure you are thinking about token names and any relevant stakeholders. Creating a simple token using the ITS Portal will use the same token name for all chains. If you need dfferent names on different chains, you'll need to build a custom token.</Callout>

<Callout 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>

## Create a new Interchain Token using the Interchain Token Portal

Expand All @@ -30,6 +33,7 @@ Congratulations! Your new Interchain Token is now available on multiple chains.

Refer to the [four-step tutorial](https://axelar.network/blog/how-to-create-an-interchain-token-with-axelar-in-4-steps) for more detailed steps on creating Interchain Tokens using the Interchain Token Portal.

<Callout emoji="💡">Make sure you are thinking about token names and any relevant stakeholders. Creating a simple token using the ITS Portal will use the same token name for all chains. If you need dfferent names on different chains, you'll need to build a custom token.</Callout>

## Create a custom Interchain Token

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Upgrade existing tokens into Interchain Token(s)

import { Callout } from "/src/components/callout";

If you already have an ERC-20 token on one or more blockchains, you can turn it into an Interchain Token by deploying [Token Managers](../../reference/glossary/#token-manager). Token Managers can be either [Lock/Release](../../reference/glossary/#lockunlock) or [Mint/Burn](../../reference/glossary/#mintburn). Canonical tokens are registered under the local chain's Lock/Release token manager and mint/burn on remote chains. They can be deployed to remote chains by anyone and don't depend on a deployer address/salt.

The Interchain Token Service is deployed to [`0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C`](https://etherscan.io/address/0xB5FB4BE02232B1bBA4dC8f81dc24C26980dE9e3C) while the Interchain Token Factory is deployed to [`0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66`](https://etherscan.io/address/0x83a93500d23Fbc3e82B410aD07A6a9F7A0670D66).

Now, let's explore how to transform existing tokens into Interchain Tokens.

<Callout emoji="🚨">
**NOTE:** The security of your token is limited to the security of the chains it integrates with. When making a token interchain, make sure that all the chains it will be deployed to are trustworthy.
</Callout>

## Canonical Tokens (Simple wrappers)

If you own an ERC-20 token on a single chain and want a wrapped, bridgeable version on other chains, register it as a [Canonical Token](../../reference/glossary/#canonical-interchain-token) with the [Interchain Token Service](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/InterchainTokenService.sol) using the [Interchain Token Factory contract](https://github.com/axelarnetwork/interchain-token-service/blob/main/contracts/InterchainTokenFactory.sol). Each token can only be registered a single time as a canonical chain.
Expand Down

1 comment on commit 471975e

@vercel
Copy link

@vercel vercel bot commented on 471975e Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.