-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Peter Maksymowsky edited this page Mar 23, 2022
·
6 revisions
For development, there are 4 things you should be bringing up
Install brew: https://brew.sh/
Install deno: https://deno.land/#installation
From diem directory:
- Install Diem dependencies including Rust, Clang, Deno, etc, by running the
following script in
diem
root directory:
./scripts/dev_setup.sh
- Install shuffle binary
cargo install --path shuffle/cli
- Run
shuffle node
to bring up a local testnet -
cd
into theshuffle_dex_modules
directory - Run
shuffle account
which generates 2 accounts, our Parent VASP account for modules and a second for testing P2P transactions - Run
shuffle build
to do a test build and see if everything works as intended - Run
shuffle deploy
to deploy the modules once you are happy. You should see them be deployed in the output. - Run
shuffle console
to run an interactive repl console where you can run functions from the .ts files.
With shuffle not running: rm -rf ~/.shuffle
then, refer to running shuffle above
- Install Python (prefer 3.9.10)
- Install pip
-
cd
into theapi
directory and runpip install -r requirements.txt
PYTHONUNBUFFERED=1 ENVIRONMENT=development FLASK_DEBUG=True FLASK_ENV=development flask run --host 0.0.0.0
You can do this in the browser or in something like postman, navigate to the following urls:
http://localhost:5000/db_reset
http://localhost:5000/initialize
For now, you can use admin
as a credential to see the exchange account.
NOTE:
Make sure you overwrite the addresses in diem_blockchain.py
:
MODULE_ADDRESS = <address in shuffle that the modules are published under>
EXCHANGE_ADDRESS = <address of the "admin" account from initialize>
- Install NodeJS (prefer v16.6.1)
- Install yarn (prefer 1.22.17)
-
cd
into theapp
directory and runyarn install
- From the
app
directory, runyarn run dev
- In your
diem
directory, build the faucet:cargo build --release -p diem-faucet
-
cd target/release
in thediem
directory - Make sure that shuffle is set up at the very least, then:
./diem-faucet -c 4 -m ~/.shuffle/nodeconfig/mint.key -p 8000 -s http://0.0.0:8080