Skip to content

altugbakan/omnipay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniPay

OmniPay Logo

Deposit once, pay anywhere
🔴 🔵 Created for ETHGlobal Superhack 🪩 ⚪️

📖 Inspiration

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.

📝 Description

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.

📱 Demo

To check out OmniPay, visit omnipay.surge.sh. You can test transferring balances between four different chains: Optimism, Base, Zora, and Mode.

🛠 Built With

🏃 Getting Started

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/altugbakan/omnipay.git
  2. 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
  3. 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 ..
  4. 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
  5. On a new terminal, run the frontend. This will start the frontend.

    cd frontend && npm run dev

📄 License

Distributed under the MIT License. See LICENSE.md for more information.