rpcbinding: convert scriptFor* from function to method

Should be a part of #3012, otherwise generated bindings are failed to
be compiled.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-06-05 17:47:17 +03:00
parent 805157b7a0
commit c7836ed6e7
3 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ func (c *ContractReader) {{.Name}}Expanded({{range $index, $arg := .Arguments}}{
}
{{ end }}{{ end }}`
methodDefinition = `{{ define "METHOD" }}{{ if eq .ReturnType "bool"}}
func scriptFor{{.Name}}({{range $index, $arg := .Arguments -}}
func (c *Contract) scriptFor{{.Name}}({{range $index, $arg := .Arguments -}}
{{- if ne $index 0}}, {{end}}
{{- .Name}} {{.Type}}
{{- end}}) ([]byte, error) {