Contract Dev Environment
Setup Guide
This is a standardised environment for developing and testing smart contracts on Xian.
Installation
Install Docker
sh
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose`
rm get-docker.sh
Clone & install contract-dev-environment
sh
git clone https://github.com/xian-network/contract-dev-environment.git
cd contract-dev-environment
make build
Usage
- Run
make test-shell
from cli- This will open a command shell inside the container
- Develop your contracts & tests in
/contracts
- To execute your tests :
pytest tests/test.py
from the shell
- To exit the test shell type
exit
- Happy coding !