Coder Social home page Coder Social logo

x-trader-joe-bridge-example's Introduction

Trader Joe Bridge Example

This is an example implementation of the Trader Joe Bridge using the @layerzerolabs/x-trader-joe-bridge package.

Required Configuration

Your app must call the bootstrap function from @layerzerolabs/x-trader-joe-bridge with token and wallet configurations.

Token Config

The token configuration dictates which tokens will be available for transfer. See mainnet for an example config. Use Token from @layerzerolabs/x-trader-joe-bridge with chain id, token address, decimals, and token symbol. Also include proxy contracts with chain id, and contract address.

Wallet Config

The app is set up to use rainbowkit as the wallet connector, see their docs for visual customization. The example app is using the default wallets list, see docs also to customize. Which networks using which rpc providers is also configurable using the wagmi chain configuration.

Rendering the Bridge

To render the Bridge, create a wallet adapter using the createWagmiProvider utility function and wrap Bridge with it and the ThemeProvider with the desired theme. If using a theme switcher this prop will need to be dynamic.

    <EthereumAdapterProvider>
        <ThemeProvider theme={themeDark}>
            <Bridge />
        </ThemeProvider>
    </EthereumAdapterProvider>

External Styles

Import styles from rainbowkit and react-tostify and include and import any custom fonts.

Running the Example App (built with Create React App)

This project was bootstrapped with Create React App. In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

x-trader-joe-bridge-example's People

Contributors

kyle-layerzero avatar piotr-layerzero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.