This project is no longer actively maintained by the team. For the active version, please visit the new ink! Playground maintained by Parity Technologies.
ink! playground is the browser IDE for Substrate's smart contract(srml-contract). This will be similar to Remix, the smart contract IDE of Ethereum. Currently, if developers want to run ink! smart contract, they have to install substrate and ink into local environment. But this takes many steps, and also it is not easy to run stably because of version compatibility issues or so. By using ink! playground, Substrate developers can test contracts easily just by writing main code on browser. It doesn't require installing Substrate or running Substrate node. This is very useful for Substrate smart contract developers. For the future works, ink! playground also provides high level security audits. This is for developer who wants to make high secured smart contracts like for enterprise use.
You can try from here
Refer this page fow the usage of ink! playground. https://www.notion.so/staketechnologies/beaa0bab965a4b809b6f649b0db3b232
ink! playground consists of three docker containers.
- ink container
- api container
- web front container
Dockerfile is located at ink/Dockerfile
Rust and ink environment is set in the docker image, and this is called from api container. mounted directory is /code/ink_compile/
Configure is written at "rest_api" in docker-compose.yml Dockerfile is located at python/Dockerfile Django source code is in /code/rest_api/test_app
This is an api server to compile ink! code into wasm. This container calls ink container for compiling.
Configure is written at "web_front" in docker-compose.yml Dockerfile is located at node/Dockerfile ReactJS source code is in is /code/web_front/
Docker should be installed.
git clone https://github.com/stakedtechnologies/ink-playground.git
cd ink-playground
#make .env file
./init.sh <PUBLIC_DNS>
At <PUBLIC_DNS>, insert public dns of the server (exclude "http://").
If you want to test locally, do like this: ./init.sh localhost
./build.sh
docker build -t ink_env ink
docker-compose up -d
open another terminal and do the following.
#start api server
docker-compose exec rest_api python3 websocket_app/server.py
open another terimnal and do the following.
#only for the first time before running
docker-compose exec web_front yarn install
#start web front server
docker-compose exec web_front yarn start
After running, you can access to page by http://localhost/
docker-compose down