Git Product home page Git Product logo

custom-cosmswap's Introduction

Cosmswap

An open-source interface for a CosmWasm decentralized exchange.

Run the app in dev mode locally.

npm run dev
# or
yarn dev

Access the app on http://localhost:3000/.

Configuration

The app configuration, feature flags, etc., is located in the .env config file.

Chain configuration

Swap our main chain and test chain info example with your configuration to suggest your chain for Keplr and allow the wallet to be used in the app. It expects to receive data in the ChainInfo format. Refer to Keplr documentation for more information.

Keplr's 'suggest chain' feature allows front-ends to add new Cosmos-SDK based blockchains that are not natively supported.

Use this env variable to update the chain info path. The app will dynamically load the configuration so that the path can point to a local file in /public or a url.

Testnet

NEXT_PUBLIC_CHAIN_INFO_TESTNET_URL=/chain_info.testnet.json
Mainnet

NEXT_PUBLIC_CHAIN_INFO_MAINNET_URL=/chain_info.mainnet.json

Provide token configuration

The app currently fetches tokens based on the content of pools list and you will need to provide another pools list json in case that you need to show more tokens.

Similarly to NEXT_PUBLIC_CHAIN_INFO_MAINNET_URL variable, the config will be loaded dynamically.

Testnet

NEXT_PUBLIC_POOLS_LIST_TESTNET_URL=/pools_list.testnet.json
Mainnet

NEXT_PUBLIC_POOLS_LIST_MAINNET_URL=/pools_list.mainnet.json

Provide IBC assets configuration

By default, the platform only renders the example IBC assets. To allow for interchain asset transfers you will need to provide your ibc tokens lists. Refer to the ibc asset configuration example for more information.

Similarly to NEXT_PUBLIC_CHAIN_INFO_MAINNET_URL & NEXT_PUBLIC_TOKEN_LIST_MAINNET_URL variables, the config will be loaded dynamically.

IBC Assets

NEXT_PUBLIC_IBC_ASSETS_URL=/ibc_assets.json

Branding configuration

App name

By default, the app uses the Cosmswap name. To update the app name, go to the .env file and change the following variable:

NEXT_PUBLIC_SITE_TITLE=Cosmswap

That will change the site title and update the footer.

Demo mode

By default, the app runs in a mainnet mode, but if you'd like to test the app in a testnet mode, please update the env variable:

NEXT_PUBLIC_TESTNET_MODE=true

App version

Update this variable if you choose to run a different version.

NEXT_PUBLIC_APP_VERSION=1.2.7

Branding

We rcommend vector graphics for your project's logo and name. Go to /logo and swap logo-only-icon.svg with yours to update the app logo while keeping the file name.

License

Licensed under Apache 2.0.

custom-cosmswap's People

Contributors

duguorong009 avatar top-dev-ops avatar

Stargazers

 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.