c3d8bc7ed5
* remove tokens context in favor of localstorage refactor localstorage improve adding custom token flow * drop exchange language * ensure url tokens are added to localstorage clean up routing remove unnecessary output approval checks * fix bad import * Remove unused imported checks * remove unused imports Co-authored-by: Ian Lapham <ianlapham@gmail.com> |
||
---|---|---|
.github | ||
public | ||
src | ||
.env.local.example | ||
.gitignore | ||
.prettierrc | ||
.travis.yml | ||
LICENSE | ||
netlify.toml | ||
package.json | ||
README.md | ||
tsconfig.json | ||
webpack.config | ||
yarn.lock |
Uniswap Frontend
This an an open source interface for Uniswap - a protocol for decentralized exchange of Ethereum tokens.
- Website: uniswap.io
- Docs: docs.uniswap.io
- Twitter: @UniswapExchange
- Reddit: /r/Uniswap
- Email: contact@uniswap.io
- Discord: Uniswap
- Whitepaper: Link
Run Uniswap Locally
-
Download and unzip the
build.zip
file from the latest release in the Releases tab. -
Serve the
build/
folder locally, and access the application via a browser.
For more information on running a local server see https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server. This simple approach has one downside: refreshing the page will give a 404
because of how React handles client-side routing. To fix this issue, consider running serve -s
courtesy of the serve package.
Develop Uniswap Locally
Install Dependencies
yarn
Configure Environment
Rename .env.local.example
to .env.local
and fill in the appropriate variables.
Run
yarn start
To run on a testnet, make a copy of .env.local.example
named .env.local
, change REACT_APP_NETWORK_ID
to "{yourNetworkId}"
, and change REACT_APP_NETWORK_URL
to e.g. "https://{yourNetwork}.infura.io/v3/{yourKey}"
.
If deploying with Github Pages, be aware that there's some tricky client-side routing behavior with create-react-app
.
Contributions
Please open all pull requests against the beta
branch. CI checks will run against all PRs. To ensure that your changes will pass, run yarn check:all
before pushing. If this command fails, you can try to automatically fix problems with yarn fix:all
, or do it manually.