Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Andyvargtz committed Jan 9, 2025
1 parent ae25105 commit 998a517
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ Interface that defines the events token transfer contract implementations must e
### `IERC20TokenTransferrer` and `INativeTokenTransferrer`

Interfaces that define the external functions for interacting with token transfer contract implementations of each type. ERC20 and native token transferrer interfaces vary from each other in that the native token transferrer functions are `payable` and do not take an explicit amount parameter (it is implied by `msg.value`), while the ERC20 token transferrer functions are not `payable` and require the explicit amount parameter. Otherwise, they include the same functions.

### TokenHome and TokenRemote
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@ Routing tokens from one `TokenRemote` instance to another is referred to as a "m

TokenRemote contracts allow for scaling token amounts, which should be used when the remote asset has a higher or lower denomination than the home asset, such as allowing for a ERC20 home asset with a denomination of 6 to be used as the native EVM asset on a remote chain (with a denomination of 18).

## `ERC20TokenRemote`
### `ERC20TokenRemote`

A concrete implementation of `TokenRemote`, `IERC20TokenTransferrer`, and `IERC20` that handles the minting and burning of an ERC20 asset. Note that the `ERC20TokenRemote` contract is an ERC20 implementation itself, which is why it takes the `tokenName`, `tokenSymbol`, and `tokenDecimals` in its constructor.

All of the ERC20 interface implementations are inherited from the standard OpenZeppelin ERC20 implementation and can be overridden in other implementations if desired.

## `NativeTokenRemote`
### `NativeTokenRemote`

A concrete implementation of `TokenRemote`, `INativeTokenTransferrer`, and `IWrappedNativeToken` that handles the minting and burning of the native EVM asset on its chain using the native minter precompile.

Deployments of this contract must be permitted to mint native coins in the chain's configuration. Note that the `NativeTokenRemote` is also an implementation of `IWrappedNativeToken` itself, which is why the `nativeAssetSymbol` must be provided in its constructor.
`NativeTokenRemote` instances always have a denomination of 18, which is the denomination of the native asset of EVM chains. We will cover Native Token Remote in depth later in the course.

`NativeTokenRemote` instances always have a denomination of 18, which is the denomination of the native asset of EVM chains.


## Register with Home

TBD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Step, Steps } from 'fumadocs-ui/components/steps';

### Deploy an ERC-20 Token

To transfer an ERC20 token from C-chain to your own blockchain, the fist thing we will need is the ERC20 token to bridge. You will find a contract in the Starter-Kit under `contracts/interchain-token-transfer/MyToken.sol:TOK` of the Starter-kit
To transfer an ERC20 token from C-chain to your own blockchain, the first thing we will need is the ERC20 token to bridge. You will find a contract in the Starter-Kit under `contracts/interchain-token-transfer/MyToken.sol:TOK`

```bash
forge create --rpc-url local-c --private-key $PK contracts/interchain-token-transfer/MyToken.sol:TOK
Expand Down

0 comments on commit 998a517

Please sign in to comment.