This directory contains the back end files (i.e., smart contracts, tests, hardhat config).
The back end of this project are smart contracts that are hosted on the Sepolia network. You do not have to redeploy the smart contracts if you want to use the live app; however, feel free to read the code and deploy it for testing purposes. The steps to redeploy the back end is below the table:
Contract | Address |
---|---|
ETH | 0x5234D63caF31AF1871f40D77C47E7744DF732336 |
USDb | 0xc4FcD839C4C584684e346dBfE1ed2817f8A7bCF7 |
Factory | 0x7F45eafd21eDC0C176706f3E833407Ee8765e9e8 |
ETH-USDb Exchange | 0xA11aC55dca0f39fF51eEc03A6E63A3De34B13f7B |
- Install node dependencies
npm install
- Make a new copy of
.env.example
called.env
and fill in the environment variables.
- Start a local node (aka Hardhat network):
npx hardhat node
- Open a new terminal and run local tests:
npm run test-local
- Top up your wallets with Sepolia ETH.
- Run:
npm run test-sepolia
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. Please use the issue labels/tags accordingly.
- Fork this project.
- Create your new branch:
git checkout -b be/<issue label>/<issue name>
- Run the local tests:
npm run test-local
- Once the updated code passes all tests, stage and commit your changes.
- Push the local branch to the forked remote repo:
git push origin be/<issue label>/<issue name>
- Navigate to the forked repo using your favourite browser and make a new pull request (PR).