New SpiritSwap version.
To run locally on your computer please use the command yarn.
- To Install Dependencies
yarn
- To Run
yarn start
- To Build
yarn build
if you want to build for a specific subdirectory
yarn build --env rootPath=/<path>/<to>/<subfolder>/
For token icons:
- Get the token image with
PNG
format. - The image not have to have bigger than 200x200px.
- The name of the token have to be the
symbol
- The image name have to be in
upperCase
- Put the images inside folder:
public/images/tokens
#####Examples:
Fantom
it will beFTM.png
--> inpublic/images/tokens/FTM.png
Bitcoin
it will beBTC.png
--> inpublic/images/tokens/BTC.png
For the token address:
- Get the next data from the token:
name
symbol
chainId
address
decimals
- Create a object like this:
const FTM = { name: 'Fantom', symbol: 'FTM', chainId: 250, address: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83', decimals: 18, };
- Add it into the
tokens array
insrc/constants/tokens.ts
- Verify that the token have liquidity on spiritswap with paraswap. On Paraswap settings, only enabled spiritswapV2.
- Verify that the token show the price information on spiritswap. If doesn't show, we need to contact to Covalent Team
Run inside another terminal:
yarn storybook
This loads the stories from ./stories
.
NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
Run inside another terminal:
yarn test
If you do some HTML changes, please update the tests.
This loads the tests from ./test
.
It really important to have many tests as possible if the package start growing to avoid future issues.
Then run the example inside another:
cd example
yarn
yarn start
One actions are added by default:
We use a semantic versioning to update the build or changes that we have on the project. They way to handle this is using a command
git add .
yarn run commit
git push