Development Environment Setup
Installing the Required Tools for Compilation and Testing
Direct Installation of Development Toolkits
Install ipyeos
, a package used for testing smart contracts or running a node:
python3 -m pip install ipyeos
Install pyeoskit
, a tool used to interact with nodes, such as deploying smart contracts, etc:
python3 -m pip install pyeoskit
Running in Docker
Currently, the development toolkit does not support Windows and Macbook M1/M2 platforms, and must be run using Docker on these platforms.
The recommended software for installing and running Docker on macOS is OrbStack. For other platforms, you can use Docker Desktop.
Download the Docker image using the following command:
docker pull ghcr.io/uuosio/pscdk:latest
Run the container:
docker run --entrypoint bash -it --rm -v "$(pwd)":/work -w /work -t ghcr.io/uuosio/pscdk
Testing the Installation Environment
Create a test project using the following command:
python-contract init mytest
cd mytest
Compile the contract code:
python-contract build mytest.codon
Alternatively, you can run the build.sh
script directly:
./build.sh
If there are no exceptions, the mytest.wasm
WebAssembly binary file will be generated.
To test the installation environment, run:
ipyeos -m pytest -s -x test.py -k test_hello
If your system is Windows, or MacOSX M1/M2, you can use the following command to run bash in docker, and then execute the above command:
docker run --entrypoint bash -it -v$(pwd):/develop -w /develop -t ghcr.io/uuosio/scdk