An open source interface for Uniswap -- a protocol for decentralized exchange of Ethereum tokens.
- Website: uniswap.org
- Interface: app.uniswap.org
- Docs: uniswap.org/docs/
- Twitter: @UniswapProtocol
- Reddit: /r/Uniswap
- Email: [email protected]
- Discord: Uniswap
- Whitepaper: Link
To access the Uniswap Interface, use an IPFS gateway link from the latest release, or visit app.uniswap.org.
Please see the @uniswap/default-token-list repository.
yarn
全局查找替换掉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'
替换成自己的发布的路由合约地址
yarn start
To have the interface default to a different network when a wallet is not connected:
- Make a copy of
.env
named.env.local
- Change
REACT_APP_NETWORK_ID
to"{YOUR_NETWORK_ID}"
- 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.
Please open all pull requests against the master
branch.
CI checks will run against all PRs.
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.