-
Initialize git submodules, and install yarn v1, node v18, and the dependencies:
git submodule update --init yarn (cd setup; yarn)
-
Update rust and cargo-contract (>= 3.2.0):
rustup update cargo install --force --locked cargo-contract
-
Try to start the local stack. devphase will download the selected prebuilt binaries from Github at the first time.
yarn devphase stack
If you haven't installed node.js, it's suggested to install it via nvm.
It's also suggested to install yarn
(classical) by npm install --global yarn
(docs).
-
start the local stack.
yarn devphase stack
-
Init the testnet (currently by this script)
# edit .env file yarn node src/setup-drivers.js
-
You can also dump the contract log from the log server driver with the same scripts:
node src/dump-logs.js
To configure the local test stack, please check devphase.config.ts.
yarn devphase contract compile
You can also specify which the contract to build by adding the contract name. The name should be
in snake case, consistent with the directory names under contracts/
.
Simply run:
yarn devphase contract test
The tests are written in TypeScript at ./tests/*.test.ts
. The logs are output to ./logs/{date}
directory.