diff --git a/generators/python.go b/generators/python.go index 816e40d..5732ddd 100644 --- a/generators/python.go +++ b/generators/python.go @@ -27,6 +27,8 @@ 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}} @@ -34,7 +36,7 @@ const pythonSrcTmpl = ` 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