• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ribbon-finance/ribbon-frontend: Frontend for ribbon.finance

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ribbon-finance/ribbon-frontend

开源软件地址:

https://github.com/ribbon-finance/ribbon-frontend

开源编程语言:

TypeScript 99.2%

开源软件介绍:

Ribbon Frontend

This repo hosts the source code that runs 3 of Ribbon Finance's webapps, the landing page and the v1 webapp.

Getting Started

To begin, check your node version. Use node v14.18.1.

node -v

Install the node dependencies:

yarn install

The frontend repo is a monorepo. Each package in the monorepo is a Yarn workspace. Structuring the repo as a monorepo allows us to share components across multiple webapps.

Setting up your environment

The webapp uses environment variables to talk to the blockchain. Copy paste these variables and create a new file webapp/.env.

You will need to have access to a node to fill up REACT_APP_MAINNET_URI and REACT_APP_TESTNET_URI, we recommend either Infura or Alchemy.

# Used to track which branch is used to deploy the app. 'staging' uses mainnet for URLs
REACT_APP_VERCEL_GIT_COMMIT_REF=staging
REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID=your_analytics_id
REACT_APP_MAINNET_URI=https://mainnet.infura.io/v3/d43d838246464b5690f8b10337b446d7
REACT_APP_TESTNET_URI=https://kovan.infura.io/v3/d43d838246464b5690f8b10337b446d7
REACT_APP_SUBGRAPHQL_URL=https://api.thegraph.com/subgraphs/name/kenchangh/ribbon-finance
REACT_APP_KOVAN_SUBGRAPHQL_URL=https://api.thegraph.com/subgraphs/name/kenchangh/ribbon-finance-kovan
REACT_APP_AIRTABLE_API_KEY=keymgnfgwnQHmH4pl
REACT_APP_AIRTABLE_BASE_ID=app5c70grFW2INfkN
REACT_APP_AVAX_URI=https://api.avax.network/ext/bc/C/rpc
REACT_APP_FUJI_URI=https://api.avax-test.network/ext/bc/C/rpc
REACT_APP_AVAX_SUBGRAPHQL_URL=https://api.thegraph.com/subgraph/name/kenchangh/ribbon-avax
REACT_APP_SOLANA_TESTNET_URI=https://api.devnet.solana.com
REACT_APP_SOLANA_MAINNET_URI=https://api.mainnet-beta.solana.com

In order to switch between the development environment and a production environment, we can change the REACT_APP_VERCEL_GIT_COMMIT_REF env var.

REACT_APP_VERCEL_GIT_COMMIT_REF=staging # used to see mainnet data

REACT_APP_VERCEL_GIT_COMMIT_REF=development # used to see testnet (kovan) data

Running the webapp

To run the webapp, you need to open two terminals, one in shared and another in webapp. We start with running yarn start in shared.

cd shared/
yarn start

Now, in the webapp directory, we can start the build server.

cd webapp/
yarn start

The webapp should automatically open at http://localhost:3000. Happy building!


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
codedamn/codedamn-hacktoberfest-projects发布时间:2022-06-08
下一篇:
radareorg/iaito: Official QT frontend of radare2发布时间:2022-06-08
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap