altugbakan / omnipay

Deposit once, pay anywhere

Home Page:https://omnipay.surge.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Deposit once, pay anywhere

https://omnipay.surge.sh

License:MIT License


Languages

Language:TypeScript 50.2%Language:Solidity 47.0%Language:JavaScript 1.5%Language:HTML 1.2%Language:CSS 0.3%