{{- define "app" -}}

These are the realm's exposed functions ("public smart contracts").

My address: (see `gnokey list`)


{{ template "func_specs" . }}
{{- end -}} {{ define "func_specs" }}
{{ $funcName := .Data.FuncName }} {{ $found := false }} {{ if eq $funcName "" }} {{ range .Data.FunctionSignatures }} {{ template "func_spec" . }} {{ end }} {{ else }} {{ range .Data.FunctionSignatures }} {{ if eq .FuncName $funcName }} {{ $found = true }} {{ template "func_spec" . }} {{ end }} {{ end }} {{ if not $found }} {{ $funcName }} not found. {{ end }} {{ end }}
{{ end }} {{ define "func_spec" }}
contract {{ .FuncName }}(...)
params {{ range .Params }}{{ template "func_param" . }}{{ end }}
results {{ range .Results }}{{ template "func_result" . }}{{ end }}
command
{{ end }} {{ define "func_param" }} {{ .Name }} {{ .Type }} {{ end }} {{ define "func_result" }} {{ .Name }} {{ .Type }} {{ end }}