Skip to content

Commit d901b6e

Browse files
committed
tinygo docker compile instructions
1 parent 10725e9 commit d901b6e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/content/docs/How To/smart contract development.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ To compile your contract:
101101
tinygo build -gc=custom -scheduler=none -panic=trap -no-debug -target=wasm-unknown -o artifacts/main.wasm contract/main.go
102102
```
103103

104+
<Aside type="tip">
105+
For the best chance of successful contract source code verification on block explorers, compile your contract using Docker:
106+
```sh
107+
docker pull tinygo/tinygo:0.39.0
108+
docker run --rm -v $(pwd):/home/tinygo tinygo/tinygo:0.39.0 tinygo build -gc=custom -scheduler=none -panic=trap -no-debug -target=wasm-unknown -o artifacts/main.wasm contract/main.go
109+
```
110+
</Aside>
111+
104112
To remove metadata from the output WASM binary to reduce file size:
105113

106114
<Tabs syncKey="wasmTools">

0 commit comments

Comments
 (0)