Giter Site home page Giter Site logo

marginswap-interface's Introduction

Marginswap trading interface

An open source interface for Marginswap.

Development

Install Dependencies

yarn

Run

yarn start

Configuring the environment (optional)

Set up marginswap-core

  1. git clone [email protected]:marginswap/marginswap-core.git
  2. cd marginswap-core
  3. git clone [email protected]:marginswap/core-abi.git build
  4. Place a private key file in your home folder ~/.marginswap-secret. If you want it to match up with your wallet like MetaMask, create the account in your wallet, copy the private key and paste it into the file.
  5. Install the dependencies by running yarn
  6. then run npx hardhat node in the marginswap-core root and leave it running in a terminal tab
  7. in a new tab, move to the build directory cd marginswap-core/build
  8. create a yarn link to this directory yarn link

set up marginswap-sdk

  1. [email protected]:marginswap/marginswap-sdk.git
  2. yarn
  3. yarn build
  4. yarn link the core-abi repo yarn link @marginswap/core-abi
  5. create a link for this repo yarn link

set up this repo (marginswap-interface)

  1. yarn
  2. cp .env.sample .env
  3. link the core repo yarn link @marginswap/core-abi
  4. link the sdk repo yarn link @marginswap/sdk
  5. In metamask, set your network to Localhost 8545, then go to Settings > Networks > Localhost 8545 and set the chain ID to 31337
  6. yarn start

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

  1. Make a copy of .env.sample named .env
  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.

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.