You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-73Lines changed: 25 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,23 @@ This project implements a cross-chain token bridge for the RLC token between Eth
6
6
7
7
The system consists of two main components:
8
8
9
-
1.**RLCAdapter (on Ethereum **Sepolia**)**: Wraps the existing RLC ERC-20 token to make it compatible with LayerZero's cross-chain messaging.
9
+
1.**RLCAdapter (on Ethereum Sepolia)**: Wraps the existing RLC ERC-20 token to make it compatible with LayerZero's cross-chain messaging.
10
10
2.**RLCOFT (on Arbitrum Sepolia)**: A new token that's minted when RLC tokens are locked in the adapter on Ethereum, and burned when tokens are sent back.
@@ -31,6 +31,16 @@ The system consists of two main components:
31
31
```
32
32
33
33
3. Create a `.env` file
34
+
```sh
35
+
cp .env.template .env # and edit .env content
36
+
```
37
+
38
+
## Contract Overview
39
+
40
+
Instead of duplicating code that may become outdated, here are links to the key contracts in the repository:
41
+
42
+
- [RLCAdapter.sol](https://github.com/iExecBlockchainComputing/rlc-multichain/blob/main/src/RLCAdapter.sol) - Ethereum-side adapter that wraps the existing RLC token
43
+
- [RLCOFT.sol](https://github.com/iExecBlockchainComputing/rlc-multichain/blob/main/src/RLCOFT.sol) - Arbitrum-side token that implements the OFT standard
34
44
35
45
## Deployment
36
46
@@ -48,90 +58,42 @@ The deployment process involves four steps:
48
58
49
59
3. Configure the RLCAdapter to trust the RLCOFT contract:
50
60
```bash
51
-
make conf-adapter
61
+
make configure-adapter
52
62
```
53
63
54
64
4. Configure the RLCOFT to trust the RLCAdapter contract:
55
65
```bash
56
-
make conf-oft
66
+
make configure-oft
57
67
```
58
68
59
69
After deployment, update your `.env` file with the deployed contract addresses.
60
70
61
71
## Usage
62
72
63
-
### Bridge RLC from Ethereum to Arbitrum
73
+
### Bridge RLC
64
74
65
-
To send RLC tokens from Ethereum Sepolia to Arbitrum Sepolia:
75
+
A. To send RLC tokens from Ethereum Sepolia to Arbitrum Sepolia:
66
76
67
77
```bash
68
-
make send-tokens
78
+
make send-tokens-to-arbitrum-sepolia
69
79
```
70
80
71
81
This will:
72
82
1. Approve the RLCAdapter to spend your RLC tokens
73
83
2. Initiate the cross-chain transfer through LayerZero
74
84
3. Lock tokens in the adapter and mint equivalent tokens on Arbitrum
75
85
76
-
### Bridge RLC from Arbitrum to Ethereum
77
-
78
-
To send RLC tokens from Arbitrum Sepolia back to Ethereum Sepolia:
86
+
B. To send RLC tokens from Arbitrum Sepolia back to Ethereum Sepolia:
79
87
80
88
```bash
81
-
make send-tokens-arbitrum-sepolia
89
+
make send-tokens-to-sepolia
82
90
```
83
91
84
92
This will:
85
93
1. Burn RLCOFT tokens on Arbitrum
86
94
2. Send a cross-chain message to the adapter
87
95
3. Release the original RLC tokens on Ethereum
88
96
89
-
## Contract Architecture
90
-
91
-
### RLCAdapter.sol
92
-
93
-
An adapter that wraps the existing RLC token to make it compatible with LayerZero's OFT protocol. It extends:
94
-
-`OFTAdapter`: Handles the OFT cross-chain logic
95
-
-`Ownable`: Provides ownership control for administrative functions
0 commit comments