OmniPay is built to solve the problem of having to deposit funds into multiple chains to pay for different services. I wanted to create a solution that would allow users to deposit funds once and pay on any blockchain they want.
Current solutions like Connext and Hop are great, but they require users to deposit funds into a specific chain. This means that if a user wants to pay for a service on a different chain, they would have to deposit funds into that chain as well. This is not ideal as it requires depositing funds into multiple chains, which can be expensive and time consuming.
OmniPay is built on top of LayerZero, a cross-chain communication protocol that allows users to send messages between different blockchains. OmniPay stores user fund data in a single smart contract on Optimism. When a user wants to deposit or withdraw, they communicate with the smart contract on Optimism via LayerZero. The smart contract then sends a message to the smart contract on the source chain to deposit or withdraw funds. This allows users to deposit funds on any chain they want, and withdraw funds from any chain they want.
To check out OmniPay, visit omnipay.surge.sh. You can test transferring balances between four different chains: Optimism, Base, Zora, and Mode.
-
Clone the repo
git clone https://github.com/altugbakan/omnipay.git
-
Copy the
.env.example
files in frontend, contracts, and router folders, and rename them to.env
. Fill in the required environment variables.cp frontend/.env.example frontend/.env cp contracts/.env.example contracts/.env cp router/.env.example router/.env
-
Run the deployment script once. This will generate the ABI and the contract addresses for the contracts. Note: To actually deploy the contracts, use the
--broadcast
flag. You will need at least 0.2 ETH on each chain.cd contracts && forge script script/OmniPay.s.sol:Deploy && cd ..
-
Run the router bot. This will start the router bot and listen for messages on the chains that are not supported by LayerZero.
cd router && npm start
-
On a new terminal, run the frontend. This will start the frontend.
cd frontend && npm run dev
Distributed under the MIT License. See LICENSE.md for more information.