This is the PrimeDAO web interface enabling the creation of and interaction with IDOs.
This project is bootstrapped by aurelia-cli.
It is written mostly in Typescript, HTML and SCSS, and is bundled using Webpack.
For more information about bundling, go to https://aurelia.io/docs/cli/webpack
Install dependencies with the following command:
npm ci
There are several ways to build and run the application. Each of the following build commands will output to the dist
folder. After building, run following to launch the result in the browser:
npm run start
npm run build
(This is the production build.)
npm run build-kovan
npm run build-dev
npm run build-dev-mainnet
Each of the following commands will serve up a site that will support Hot Module Reload (HMR). You can then use your favorate debugger to launch the app at http://localhost:3330.
npm run serve-dev
npm run serve-dev-mainnet
Prime Pool relies on solidity contract addresses and ABIs that it obtains from the contracts package. In the case that any of these contracts change, you may clone the contracts package in a folder sibling to this one, and run a script to pull the required information from the contracts package into this one, by running the following:
npm run fetchContracts
Prime Launch refers to a list of Seeds that it will display as "Featured" to its users, looking at runtime for this list in the master branch of this repository at /src/configurations/featuredSeeds.json.
Various code dependencies include:
- ethplorer.io, at api.ethplorer.io, for token information
- coingecko, at api.coingecko.com/api/v3/coins, for token information
- the Balancer subgraph, at api.thegraph.com/subgraphs/name/balancer-labs/balancer, for pool information
- Web3Modal for selecting wallet providers
- ethers.js for interacting with ethereum and wallet providers
- Rivet for the mainnet provider
Run npm run lint
and confirm that lint succeeds before git commits.
You can run npm run lint.fix
to have lint automatically fix all fixable errors.
Run npm run test
.
To run in watch mode, npm run test --watch
.
To run the Webpack Bundle Analyzer, do npm run analyze
(production build).
Make sure you have in your environment (or in a ".env" file) the following:
DEPLOY_PINATA__SECRET_API_KEY=
DEPLOY_PINATA__API_KEY=
RIVET_ID=
INFURA_ID=
ETHPLORER_KEY=
ETHERSCAN_KEY=
PINATA_API_KEY=
PINATA_SECRET_API_KEY=
PINATA_API_KEY_TEST=
PINATA_SECRET_API_KEY_TEST=
IPSTACK_API_KEY=
When building for production, the build will look for variables in ".env.production".