GithubHelp home page GithubHelp logo

simpledex-ui-example's Introduction

SimpleDEX

Example DEX built using OasisDEX, Dai.js, DAI-UI, using the frontend boilerplate nextjs-daijs-dai-ui-example

Current revision works with Kovan, on the ETH-DAI pair.

Getting Started

For development run:

yarn run dev

Open http://localhost:3000, or to connect the kovan network pass the query string network=kovan like this: http://localhost:3000/?network=kovan

Theming

This app uses theme-ui with the dai-ui Maker theme. For more information see here, or start editing the theme.js file right away.

Dai.js

This app includes the Dai.js SDK along with a minimal Context Provider to connect web3 browser accounts & fetch some data. By default the app will connect to mainnet. To connect to the kovan network pass the query string network=kovan in the URL.

MDX Support

Included is the next-mdx plugin for markdown support. You can import .mdx files as react components, or drop files in your pages directory and they will be served by Next. See here for more information.

Testing

To spin up a local testchain and run jest:

yarn test

To spin up the testchain separately:

yarn testchain

This app uses jest with react-testing-library and is preconfigured with a custom render function that wraps the UI elements in ThemeProvider and MakerProvider.

Jest is configured to look in the test/helpers directory for helper utilities so you can import the custom render function like this: import { render } from 'render';

IPFS

Requires IPFS to be installed locally. First build and export the project.

yarn build && yarn export

Add output directory to ipfs.

ipfs add -r out

Resources

  • Dai.js - Javascript SDK for interacting with the Maker system.
  • Dai-ui - Theme colors and scales built with theme-ui.
  • Theme UI - A constraint-based system for organizing styles in UI design.
  • Testchain - Start a local test chain with the MakerDAO contracts deployed on it, quickly and easily.
  • MDX - Markdown for the component era.
  • React testing library - Simple and complete React DOM testing utilities that encourage good testing practices.
  • IPFS - A peer-to-peer hypermedia protocol designed to make the web faster, safer, and more open.
  • Next.js - Learn about Next.js features and API.

simpledex-ui-example's People

Contributors

madumas 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.