Smart-Disperse is a cross-chain token dispersal solution that enables the seamless transfer of tokens between different chains using custom interoperability contracts.
This project consists of custom interoperability contracts enabling cross-chain token operations.
Ensure the following are installed on your system:
Start by cloning the repository:
git clone https://github.com/Smart-Disperse/Interop-contracts-
Install Foundry and Supersim:
- Follow the respective documentation to install Foundry and Supersim.
-
Install Dependencies:
Navigate to theInterop-contractsdirectory and run:forge install
-
Run Supersim:
Open a new terminal, navigate to the project directory, and run:supersim --interop.autorelay
-
Set Environment Variables:
- Copy
.env-exampleto.env. - Modify the
.envfile with your configurations.
Source the environment variables:
source .env - Copy
-
Deploy the Contracts:
Deploy contracts to the respective chains:forge script script/deploy.s.sol --sig "deploy(string)" "OP1" --broadcast forge script script/deploy.s.sol --sig "deploy(string)" "OP2" --broadcast
Copy the contract addresses generated during deployment and save them for later use. Do not close the terminal running the Supersim node.
-
WETH Token Setup:
Import WETH into Metamask using the following address:0x4200000000000000000000000000000000000024 -
Token Transfer Across Chains:
When ETH is transferred cross-chain, WETH will be sent to the recipient on the destination chain. -
Mint WETH:
To mint WETH to a specific address, set the private key of the desired address in your.envfile and run:forge script script/MintWeth.s.sol --sig "mintWeth(string)" "OP1" --broadcast
Replace
"OP1"with"OP2"based on the target chain.
- Keep the terminal running the Supersim node active at all times.
- Test functionalities thoroughly to ensure smooth operation.
Feel free to contribute or raise issues in the repository! 😊