GithubHelp home page GithubHelp logo

coinswap's Introduction

Uniswap Interface

An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.

一.deploy smart contract

二. Accessing the Uniswap Interface

To access the Uniswap Interface, use an IPFS gateway link from the latest release, or visit app.uniswap.org.

Listing a token

Please see the @uniswap/default-token-list repository.

Development

1.Install Dependencies

yarn

2. replace data

全局查找替换掉uniswap合约数据(前端项目引用了uniswap的sdk,工厂合约,code是硬编码在sdk中的)

--合约信息(uniswap官方)
factory:0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
router:0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
code:0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f

替换成自己发布的合约信息 如:

--ropsten测试网络
factory:0xe543c636ee1e1712d71d2f2e2c794734ed065fb6
router:0x75189c2e3b88169f36459fbcc8ccfd6c05233233
byteCode:0x47057720542d8658992f8b0f3b976a1cd82407175676c361c74a89386ff84547

替换路由合约地址(src\constants\index.ts文件中)

export const ROUTER_ADDRESS = '0x75189c2e3b88169f36459fbcc8ccfd6c05233233'
替换成自己的发布的路由合约地址

Run

yarn start

Configuring the environment (optional)

To have the interface default to a different network when a wallet is not connected:

  1. Make a copy of .env named .env.local
  2. Change REACT_APP_NETWORK_ID to "{YOUR_NETWORK_ID}"
  3. Change REACT_APP_NETWORK_URL to e.g. "https://{YOUR_NETWORK_ID}.infura.io/v3/{YOUR_INFURA_KEY}"

Note that the interface only works on testnets where both Uniswap V2 and multicall are deployed. The interface will not work on other networks.

Contributions

Please open all pull requests against the master branch. CI checks will run against all PRs.

Accessing Uniswap Interface V1

The Uniswap Interface supports swapping against, and migrating or removing liquidity from Uniswap V1. However, if you would like to use Uniswap V1, the Uniswap V1 interface for mainnet and testnets is accessible via IPFS gateways linked from the v1.0.0 release.

coinswap's People

Contributors

niukouman avatar

Stargazers

Luffy avatar

Watchers

 avatar

Forkers

rainjohn

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.