This project was forked from cbdc-sandbox-frontend and further developed to explore the Cross Border Payment use-case as part of Project Icebreaker.
This a sandbox project and not intended for production; use at your own risk.
To run the frontend locally, simply run:
$ git clone [email protected]:norges-bank/cbdc-sandbox-cross-border.git
$ cd cbdc-sandbox-cross-border
$ npm install
$ cd compose/backend/fxp && npm install && cd ../../..
$ cd compose/backend/hub && npm install && cd ../../..
$ cd compose/backend/psp && npm install && cd ../../..- Add 2 wallet files to the
compose/backend/fxp/walletsdirectory with file-namesfxp1.jsonandfxp2.json. - Set 2 environment variables
NO_FXP1_WALLET_ADDRESSandNO_FXP2_WALLET_ADDRESSfor the mocked HUB indocker-compose.override.ymlto the 2 wallet addresses matching the wallet files
Configure the following environment variables in docker-compose.yml and docker-compose.override.yml:
- frontend:
REACT_APP_HUB_REQUEST_HEADERREACT_APP_HTLC_CONTRACT_ADDRESSREACT_APP_SENDER_HOST
- FXP1:
PORTFXP_IDFXP_BASE_URLHUB_URLHUB_REQUEST_HEADERFX_API_BASE_URLJSON_RPC_PROVIDER_URLHTLC_CONTRACT_ADDRESS
- FXP2:
PORTFXP_IDFXP_BASE_URLHUB_URLHUB_REQUEST_HEADERFX_API_BASE_URLJSON_RPC_PROVIDER_URLHTLC_CONTRACT_ADDRESS
- PSP:
PORTJSON_RPC_PROVIDER_URLHTLC_CONTRACT_ADDRESS
- nginx:
FRONTEND_URLFXP1_URLFXP2_URLPSP_URLHUB_URLJSON_RPC_PROVIDER_URLBLOCKSCOUT_URL
- HUB:
PORTIS_PVPVP_ENABLEDNO_NOK_HOSTNO_FXP1_HOSTNO_FXP1_HOST_NAMENO_FXP1_WALLET_ADDRESSNO_FXP2_HOSTNO_FXP2_HOST_NAMENO_FXP2_WALLET_ADDRESSIL_FXP1_HOST_NAMESE_FXP1_HOST_NAMEHUB_REQUEST_HEADERHUB_RESPONSE_HEADER
Create the following .txt files in the /compose/secrets directory (replace empty strings in the below commands with the appropriate values):
$ echo "" > compose/secrets/fxp1_wallet_password.txt
$ echo "" > compose/secrets/fxp2_wallet_password.txt
$ echo "" > compose/secrets/rpc_header.txt
$ echo "" > compose/secrets/rpc_password.txt
$ echo "" > compose/secrets/rpc_user.txtRun the following command to start the development servers:
$ docker-compose up --build --force-recreateBy default, the React app should start running on localhost:8080.
Run the following command to shut down the development servers:
$ docker-compose down