From cae5b8541dd72bae1087079e35e7c95d4ecb2ecd Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Thu, 20 Jan 2022 13:28:04 +0300 Subject: [PATCH] docs/compiler.md: update initialization info Signed-off-by: Evgeniy Stratonikov --- docs/compiler.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/compiler.md b/docs/compiler.md index b99da5398..4a0760b51 100644 --- a/docs/compiler.md +++ b/docs/compiler.md @@ -54,10 +54,16 @@ this requires you to set proper `GOROOT` environment variable, like export GOROOT=/usr/lib64/go/1.15 ``` -You'll also need to initialize go modules for your contract like this (in the +The best way to create a new contract is using `contract init` command. This will +create an example source file, config file and `go.mod` with `github.com/nspcc-dev/neo-go/pkg/interop` dependency. +``` +$ ./bin/neo-go contract init --name MyAwesomeContract +$ cd MyAwesomeContract +``` + +You'll also need to download dependency modules for your contract like this (in the directory containing contract package): ``` -$ go mod init $ go mod tidy ```