Skip to content

mirzadipradhana/nft-marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥞 Pancake Frontend

Netlify Status

This project contains the main features of the pancake application.

If you want to contribute, please refer to the contributing guidelines of this project.

Documentation

CHAIN CONFIG

  1. Set environment config for the new chain, the example is described as follow
REACT_APP_API_PROFILE = https://profile.pancakeswap.com
REACT_APP_MAIN_CHAIN_ID = "25"
REACT_APP_NODE_1 = "https://rpc-eu-1.cyborgswap.io"
REACT_APP_NODE_2 = "https://rpc-eu-2.cyborgswap.io"
REACT_APP_GTAG = "GTM-T3K6P8M"
REACT_APP_API_NFT = "https://api.ebisusbay.com"
SKIP_PREFLIGHT_CHECK = true
REACT_APP_MAIN_CHAIN_ID = "25"
REACT_APP_TEST_CHAIN_ID = "97"
REACT_APP_ROUTER_ADDRESS = "0xD3B68a35002B1d328a5414cb60Ad95F458a8cf92"
REACT_APP_FACTORY_ADDRESS = "0x6C50Ee65CFcfC59B09C570e55D76daa7c67D6da5"
REACT_APP_INIT_CODE_HASH = "0xc98c8a44f227342a1b0a885d127d26c6fedc5cc43f38c469de814ed4d0e383b1"
REACT_APP_ETHER_CURRENCY = "18|CRO|CRO"
REACT_APP_WRAPPED_ETHER_CURRENCY = "18|WCRO|Wrapped CRO|https://www.cronos.org|0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23"

Important Notes

Make sure REACT_APP_NODE_<1|2|3> pointing to the right URL. REACT_APP_ETHER_CURRENCY store native token information with a pipe delimiter and the following format: <decimals>|<symbol>|<name>

  1. Create chain specific config 2.1 Create a new folder inside src/config directory and named it with the chain id. For example, if you are create a config for a new chain -- let say chainId 137 -- then name the folder like this src/config/137. 2.2 Copy the src/config/25 config to src/config/137 2.3 Adjust the value

  2. Make sure index 0 of BASES_TO_TRACK_LIQUIDITY_FOR is set to wrapped native token of its chain. For example, you need to set WCRO on index 0 in CRO config and WBNB token is set on index 0 in BSC config

  3. Make sure the native token and wrapped native token is registered on src/config/<chainId>/tokens.ts (the key have to be in lowercase)

DEVELOPMENT

yarn start

The start script will:

  1. build the config based on the value set on the env REACT_APP_MAIN_CHAIN_ID. For example, if REACT_APP_MAIN_CHAIN_ID is having a value of 25 then it will build the config using ./src/config/25 config.
  2. build sdk
  3. run dev server

Important Notes

Everytime you make a changes on the config (./src/config/<chain_id>) , you need to run yarn build unless you setup a file watcher and trigger the build script everytime the change occured

DEPLOYMENT

You need to set the environment variables and make sure dotenv is loaded from environment variables instead of dotfiles

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •