Docker images for testing funC contracts via toncli
2.7K
Main goal of this repo is to make testing of TON contracts code easy and reliable.
Images are built from https://github.com/Trinketer22/func_docker repo.
Any kind of contribution is welcome!
Is a tool for building/testing/interacting with TON contracts.
Check it out:https://github.com/disintar/toncli
Multi arch support amd64 and arm64/v8 (M1 compatible).
Run docker tag trinketer22/func_docker toncli-local to give image shorter alias.
Run
docker run --rm -it \
-v ~/Dev:/code \
toncli-local start --name test_project wallet
You're going to see the toncli project structure in ~/Dev/test_project
README.md build fift func project.yaml tests
Run
docker run --rm -it \
-v ~/Dev/test_project:/code \
toncli-local build
docker run --rm -it \
-v ~/Dev/test_project:/code \
toncli-local run_tests
Now here is the tricky part.
Toncli stores deployment info in it's config directory instead of your project directory.
So we're going to have to create another volume for that to persist.
Run
docker run --rm -it \
-v ~/Dev/test_project:/code \
-v /path/to/toncli_conf_dir/:/root/.config \
toncli-local update_libs
After that you should go through standard toncli initialization dialog and pass absolute paths to the binaries
Don't get confused those path's are inside the docker image and not your local system.
After that you should get an initialized toncli directory on your local system at /path/to/toncli_conf_dir/toncli.
Looking like:
config.ini
fift-libs
func-libs
test-libs
Now you can use it in the deploy or any other process like so.
Run
docker run --rm -it \
-v /path/to/project:/code \
-v /path/to/toncli_conf_dir/:/root/.config \
toncli-local deploy --net testnet
wallet directory would be created inside your local config dir with all the usefull deployment information
docker run --rm -it \
-v <code_volume> \
-v [optional config volume] \
<docker image name> \
<toncli command you want to run>
Content type
Image
Digest
sha256:66032c143…
Size
172.4 MB
Last updated
about 1 year ago
docker pull trinketer22/func_docker