-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into milkomeda-c1-testnet
- Loading branch information
Showing
27 changed files
with
8,446 additions
and
26,692 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 |
---|---|---|
@@ -1,83 +1,77 @@ | ||
# Getting Started with Create React App | ||
# Djed-Solidity-WebDashboard | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
Djed is a formally verified crypto-backed autonomous stablecoin protocol. To learn more, please check our **[gitbook docs](https://docs.djed.one/alliance/the-djed-alliance)**. | ||
|
||
This repository contains the complete source code for a frontend application designed to facilitate user interaction with deployments of a [Solidity implementation](https://github.com/DjedAlliance/Djed-Solidity) of the Djed protocol. | ||
|
||
## Pre-requisites | ||
Known deployments of this frontend can be used at: | ||
|
||
We handle environment variables in `.env` files with default values in [env/](./env/) folder, i.e. [env/](./env/) contains `*.env` files for specific environments. If the repo is freshly cloned, you can copy one of those files to the root folder as `.env`, `cp ./env/milkomeda-c1-testnet.env .env` is good enough for most cases. | ||
* [https://milkomeda-c1.djed.one](https://milkomeda-c1.djed.one) | ||
* [https://milkomeda-c1-testnet.djed.one](https://milkomeda-c1-testnet.djed.one) | ||
|
||
We use [nvm](https://github.com/nvm-sh/nvm) to handle the Node version, if you don't use `nvm`, the Node version can take from the [.nvmrc](./.nvmrc) file. | ||
By utilizing this frontend application, users can conveniently engage with Djed deployments and explore the functionalities provided by the smart contracts. | ||
|
||
Run `npm install` to download the project dependencies. | ||
To run this frontend locally, follow the [Installation](#installation) and [Usage](#usage) instructions below. | ||
|
||
## Available Scripts | ||
And, please, feel welcome to [contribute](#contributing). | ||
|
||
In the project directory, you can run: | ||
## Installation | ||
|
||
### `npm start` | ||
We use [nvm](https://github.com/nvm-sh/nvm) to handle the Node version, if you don't use `nvm`, the Node version can be taken from the [.nvmrc](./.nvmrc) file. | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
The page will reload when you make changes.\ | ||
You may also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run format` | ||
To download the project dependencies, run: | ||
``` | ||
npm install | ||
``` | ||
|
||
Formats the code to comply with the `prettier` style. | ||
## Usage | ||
|
||
### `npm run build` | ||
In the project directory, run: | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
``` | ||
npm start | ||
``` | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can't go back!** | ||
|
||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
This will run the app in development mode. | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. | ||
The page will automatically reload when you make changes in the code. | ||
You may also see any lint errors in the console. | ||
|
||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. | ||
|
||
## Learn More | ||
To launch the test runner in interactive watch mode, run: | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
``` | ||
npm test | ||
``` | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
See React's documentation section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### Code Splitting | ||
To format the code to comply with the `prettier` style, run: | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) | ||
``` | ||
npm run format | ||
``` | ||
|
||
### Analyzing the Bundle Size | ||
To build the app for production to the `build` folder, run: | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) | ||
``` | ||
npm run build | ||
``` | ||
|
||
### Making a Progressive Web App | ||
This will correctly bundle React in production mode and optimize the build for the best performance. | ||
The build is minified and the filenames include the hashes. | ||
The app is ready to be deployed! | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) | ||
See React's documentation section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) | ||
## Contributing | ||
|
||
### Deployment | ||
Contributions are always welcome! | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) | ||
If you would like to contribute, please join our [Discord channel](https://discord.gg/vXQ86XGSbQ) and reach out to us. | ||
|
||
### `npm run build` fails to minify | ||
--- | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) | ||
Thanks for reading 😊 |
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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
const webpack = require('webpack'); | ||
const webpack = require("webpack"); | ||
|
||
module.exports = { | ||
webpack: { | ||
configure: (webpackConfig) => { | ||
const wasmExtensionRegExp = /\.wasm$/; | ||
webpackConfig.resolve.extensions.push('.wasm'); | ||
webpackConfig.experiments = { | ||
asyncWebAssembly: true, | ||
topLevelAwait: true, | ||
layers: true, | ||
}; | ||
webpackConfig.resolve.fallback = { | ||
buffer: require.resolve('buffer/'), | ||
stream: require.resolve('stream-browserify'), | ||
} | ||
webpackConfig.module.rules.forEach((rule) => { | ||
(rule.oneOf || []).forEach((oneOf) => { | ||
if (oneOf.type === "asset/resource") { | ||
oneOf.exclude.push(wasmExtensionRegExp); | ||
} | ||
}); | ||
}); | ||
webpackConfig.plugins.push(new webpack.ProvidePlugin({ | ||
Buffer: ['buffer', 'Buffer'], | ||
})); | ||
webpack: { | ||
configure: (webpackConfig) => { | ||
const wasmExtensionRegExp = /\.wasm$/; | ||
webpackConfig.resolve.extensions.push(".wasm"); | ||
webpackConfig.experiments = { | ||
asyncWebAssembly: true, | ||
topLevelAwait: true, | ||
layers: true | ||
}; | ||
|
||
return webpackConfig; | ||
} | ||
webpackConfig.resolve.fallback = { | ||
buffer: require.resolve("buffer/"), | ||
stream: require.resolve("stream-browserify") | ||
}; | ||
webpackConfig.module.rules.forEach((rule) => { | ||
(rule.oneOf || []).forEach((oneOf) => { | ||
if (oneOf.type === "asset/resource") { | ||
oneOf.exclude.push(wasmExtensionRegExp); | ||
} | ||
}); | ||
}); | ||
|
||
webpackConfig.plugins.push( | ||
new webpack.ProvidePlugin({ | ||
Buffer: ["buffer", "Buffer"] | ||
}) | ||
); | ||
|
||
return webpackConfig; | ||
} | ||
} | ||
} | ||
}; |
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
Oops, something went wrong.
b02a430
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preview ready at https://milkomeda-c1-testnet.djed.codepreview.io