mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 03:41:45 +00:00
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:
parent
805157b7a0
commit
c7836ed6e7
3 changed files with 3 additions and 3 deletions
|
@ -194,7 +194,7 @@ func (c *Contract) SetPriceUnsigned(priceList []any) (*transaction.Transaction,
|
|||
return c.actor.MakeUnsignedCall(c.hash, "setPrice", nil, priceList)
|
||||
}
|
||||
|
||||
func scriptForRegister(name string, owner util.Uint160) ([]byte, error) {
|
||||
func (c *Contract) scriptForRegister(name string, owner util.Uint160) ([]byte, error) {
|
||||
return smartcontract.CreateCallWithAssertScript(c.hash, "register", name, owner)
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func New(actor Actor) *Contract {
|
|||
return &Contract{actor, hash}
|
||||
}
|
||||
|
||||
func scriptForVerify() ([]byte, error) {
|
||||
func (c *Contract) scriptForVerify() ([]byte, error) {
|
||||
return smartcontract.CreateCallWithAssertScript(c.hash, "verify")
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue