Skip to content

Commit

Permalink
python: fix generated contract methods (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Apr 21, 2023
1 parent 5d23770 commit f7bf5ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generators/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ import (
const pythonSrcTmpl = `
{{- define "METHOD" }}
@staticmethod
{{- if ne .NameABI .Name}}
@display_name("{{.NameABI }}"){{end}}
def {{.Name}}({{range $index, $arg := .Arguments -}}
{{- if ne $index 0}}, {{end}}
{{- .Name}}: {{.Type}}
{{- end}}) -> {{if .ReturnType }}{{ .ReturnType }}: {{ else }} None: {{ end }}
pass
{{- end -}}
from boa3.builtin.type import UInt160, UInt256, ECPoint
from boa3.builtin.compile_time import contract
from boa3.builtin.compile_time import contract, display_name
from typing import cast, Any
Expand Down

0 comments on commit f7bf5ef

Please sign in to comment.