Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
martin0995 authored Aug 27, 2024
1 parent 1ba57d3 commit 5695ffc
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,51 @@ This repository demonstrates how to deploy and interact with smart contracts for

Before using this project, make sure you have the following:

- [Node.js and npm installed](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- [Forge](https://book.getfoundry.sh/getting-started/installation) (for compiling and testing smart contracts)
- A funded wallet with testnet tokens for deployment and transfers
- A funded wallet with TestNet tokens for deployment and transfers

## Getting Started

1. Clone the repository and navigate to the project directory:
**1. Clone the repository and navigate to the project directory:**

```bash
git clone https://github.com/martin0995/cross-chain-token-transfers
cd cross-chain-token-transfers
```
```bash
git clone https://github.com/martin0995/cross-chain-token-transfers
cd cross-chain-token-transfers
```

2. Install the project dependencies:
**2. Install the project dependencies:**

```bash
npm install
npm install
```

3. Set up environment variables:
**3. Set up environment variables:**

Create a `.env` file in the root directory and add your `private key`:

```bash
PRIVATE_KEY=INSERT_PRIVATE_KEY
PRIVATE_KEY=INSERT_PRIVATE_KEY
```

> **_NOTE:_** This private key should be funded with testnet tokens on the chains you want to use.
> **_NOTE:_** This private key should be funded with TestNet tokens on the chains you want to use.
4. Configure the chains:
**4. Configure the chains:**

Edit the `config.js` file to include the chain IDs, contract addresses, and RPC URLs for the chains you want to use.

5. Compile the smart contracts:
**5. Compile the smart contracts:**

```bash
forge compile
forge compile
```

## Deployment

To deploy the smart contracts:

```bash
npm run deploy
npm run deploy
```

- You will be prompted to select the **`source`** and **`target`** chains for deployment.
Expand All @@ -61,24 +61,24 @@ To deploy the smart contracts:
To initiate a token transfer across chains:

```bash
npm run transfer
npm run transfer
```

- You will be prompted to select the **`source`** and **`target`** chains for the transfer.
- Provide the token address, recipient address on the target chain, and the amount to transfer.

## Recommended Test Setup: Transfer USDC

To test the cross-chain transfer, I recommend using the **USDC token**, as it’s widely supported across different testnets.
To test the cross-chain transfer, I recommend using the **USDC token**, as it’s widely supported across different TestNets.

- USDC Token Address on Avalanche Fuji: `0x5425890298aed601595a70ab815c96711a31bc65`
- USDC Token Address on Celo Alfajores: `0x2F25deB3848C207fc8E0c34035B3Ba7fC157602B`

You can obtain USDC on testnets via the official USDC faucet:
You can obtain USDC on TestNets via the official USDC faucet:

- [USDC Testnet Faucet](https://faucet.circle.com/)

Once you have USDC, use the provided addresses above to transfer between testnets.
Once you have USDC, use the addresses above to transfer between testnets.

## Contracts Overview

Expand All @@ -96,5 +96,5 @@ The project includes two main contracts:

## Notes

- Ensure your wallet has enough testnet tokens to cover gas fees on both the source and target chains.
- The current setup supports ERC-20 tokens like WETH, USDC, and WBTC.
- Ensure your wallet has enough TestNet tokens to cover gas fees on both the source and target chains.
- The current setup supports ERC-20 tokens like WETH, USDC, and WBTC.

0 comments on commit 5695ffc

Please sign in to comment.