Git Product home page Git Product logo

audaces-perps-ui's Introduction

Audaces Protocol UI

An implementation of a UI for the Audaces protocol.

Starting local environment

yarn && yarn start

To create a production build that can be served by a static file server:

yarn build

Customization

The Audaces protocol UI uses React and Material UI. To learn how to customize it, refer to their official guide

Collecting fees

You can collect 10% of the fees via hosting a UI or sharing your referral link.

Referral link

Audaces protocol supports referral link via the Solana Naming Service. In order to allow referral links, the environment variable needs to be set to true

REACT_APP_ALLOW_REF_LINKS=true

To disable referral links

REACT_APP_ALLOW_REF_LINKS=false

In order to create a referral link:

  1. Register your Twitter handle using the Solana Naming Service
  2. Create a USDC account in the wallet linked to your Twitter handle

After completing these two steps, your referral link will be https://<ui_domain>/ref/<your_twitter_handle>

Hosting a UI

You can also collect fees by hosting a UI. In order to collect the fees, you need to modify the .env file that looks like this:

REACT_APP_REFERRAL_FEES_ADDRESS=

To collect fees enter your USDC SPL, for example if your USDC address is CQkAGKEAXWSMGgd8k7N6QqxBtyz7xfMb4MFHPzC9rVhA

REACT_APP_REFERRAL_FEES_ADDRESS=CQkAGKEAXWSMGgd8k7N6QqxBtyz7xfMb4MFHPzC9rVhA

โš ๏ธ It needs to be USDC address, it cannot be a SOL address.

Hosting

Github Pages

The UI can be hosted on Github pages using gh-pages.

Installing gh-pages

yarn add -D gh-pages

Add the following to the package.json file

"predeploy": "git pull --ff-only && yarn && yarn build",
"deploy": "gh-pages -d build"

Deployment

yarn deploy

IPFS

The UI can be hosted on IPFS pages using ipfs-deploy.

Installing ipfs-deploy

yarn global add ipfs-deploy

Add the following to the package.json file

"predeploy": "git pull --ff-only && yarn && yarn build",
"deploy": "ipfs-deploy build"

Deployment

yarn deploy

To deploy using Cloudflare refer to the official documentation of ipfs-deploy: https://github.com/ipfs-shipyard/ipfs-deploy

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.