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 git@github.com: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/wallets
directory with file-namesfxp1.json
andfxp2.json
. - Set 2 environment variables
NO_FXP1_WALLET_ADDRESS
andNO_FXP2_WALLET_ADDRESS
for the mocked HUB indocker-compose.override.yml
to 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_HEADER
REACT_APP_HTLC_CONTRACT_ADDRESS
REACT_APP_SENDER_HOST
- FXP1:
PORT
FXP_ID
FXP_BASE_URL
HUB_URL
HUB_REQUEST_HEADER
FX_API_BASE_URL
JSON_RPC_PROVIDER_URL
HTLC_CONTRACT_ADDRESS
- FXP2:
PORT
FXP_ID
FXP_BASE_URL
HUB_URL
HUB_REQUEST_HEADER
FX_API_BASE_URL
JSON_RPC_PROVIDER_URL
HTLC_CONTRACT_ADDRESS
- PSP:
PORT
JSON_RPC_PROVIDER_URL
HTLC_CONTRACT_ADDRESS
- nginx:
FRONTEND_URL
FXP1_URL
FXP2_URL
PSP_URL
HUB_URL
JSON_RPC_PROVIDER_URL
BLOCKSCOUT_URL
- HUB:
PORT
IS_PVPVP_ENABLED
NO_NOK_HOST
NO_FXP1_HOST
NO_FXP1_HOST_NAME
NO_FXP1_WALLET_ADDRESS
NO_FXP2_HOST
NO_FXP2_HOST_NAME
NO_FXP2_WALLET_ADDRESS
IL_FXP1_HOST_NAME
SE_FXP1_HOST_NAME
HUB_REQUEST_HEADER
HUB_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.txt
Run the following command to start the development servers:
$ docker-compose up --build --force-recreate
By default, the React app should start running on localhost:8080.
Run the following command to shut down the development servers:
$ docker-compose down