-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add playground
- Loading branch information
Showing
98 changed files
with
9,210 additions
and
907 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# generated | ||
/generated | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# git | ||
.git | ||
**/.github | ||
|
||
#ide | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Public rpc urls | ||
RPC_PROVIDER_URL_1 = https://rpc.ankr.com/eth | ||
RPC_PROVIDER_URL_5 = https://rpc.ankr.com/eth_goerli | ||
|
||
# supported networks for connecting wallet | ||
SUPPORTED_CHAINS=1,5 | ||
|
||
# this chain uses when a wallet is not connected | ||
DEFAULT_CHAIN=5 | ||
|
||
# WalletConnect project ID | ||
WALLETCONNECT_PROJECT_ID= | ||
|
||
ANALYZE_BUNDLE=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": ["../.eslintrc.base.json"], | ||
"parserOptions": { | ||
"project": "./playground/tsconfig.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# generated | ||
/generated | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
tsconfig.tsbuildinfo | ||
|
||
# env | ||
.env.local | ||
.env.production | ||
.env.development | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
#ide | ||
.vscode | ||
.idea | ||
|
||
/public/runtime/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# build env | ||
FROM node:16-alpine as build | ||
|
||
WORKDIR /app | ||
|
||
RUN apk add --no-cache git=2.36.3-r0 | ||
COPY package.json yarn.lock ./ | ||
|
||
RUN yarn install --frozen-lockfile --non-interactive --ignore-scripts && yarn cache clean | ||
|
||
COPY . . | ||
RUN NODE_NO_BUILD_DYNAMICS=true yarn build | ||
# public/runtime is used to inject runtime vars; it should exist and user node should have write access there for it | ||
RUN rm -rf /app/public/runtime && mkdir /app/public/runtime && chown node /app/public/runtime | ||
|
||
# final image | ||
FROM node:16-alpine as base | ||
|
||
ARG BASE_PATH="" | ||
ARG SUPPORTED_CHAINS="1" | ||
ARG DEFAULT_CHAIN="1" | ||
|
||
ENV NEXT_TELEMETRY_DISABLED=1 \ | ||
BASE_PATH=$BASE_PATH \ | ||
SUPPORTED_CHAINS=$SUPPORTED_CHAINS \ | ||
DEFAULT_CHAIN=$DEFAULT_CHAIN | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache curl=7.83.1-r4 | ||
COPY --from=build /app /app | ||
|
||
USER node | ||
EXPOSE 3000 | ||
|
||
HEALTHCHECK --interval=10s --timeout=3s \ | ||
CMD curl -f http://localhost:3000/api/health || exit 1 | ||
|
||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Lido Ethereum SDK Playground | ||
|
||
This is playground for SDK development and testing build as Next.js app. | ||
|
||
- fill `.env.local` as per `.env.example` | ||
- `yarn install` | ||
- `yarn dev` to launch dev app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/// <reference types="@lidofinance/theme" /> | ||
/// <reference types="styled-components/cssprop" /> | ||
|
||
declare module '*.svg' { | ||
import React = require('react'); | ||
export const ReactComponent: React.SFC<React.SVGProps<SVGSVGElement>>; | ||
const src: string; | ||
export default src; | ||
} | ||
|
||
type RuntimeConfig = { | ||
basePath?: string; | ||
apiProviderUrls?: Record<number, string>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"branch": "REPLACE_WITH_BRANCH", | ||
"commit": "REPLACE_WITH_COMMIT" | ||
} |
Oops, something went wrong.