smartcontract: add DO NOT EDIT warning to autogenerated files

Close #3139.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-10-18 20:32:51 +03:00
parent ef2bc7ca04
commit 6476241b3a
17 changed files with 37 additions and 1 deletions

View file

@ -176,6 +176,8 @@ func Blocks() []*alias.Block {
bs, err := os.ReadFile(outPath) bs, err := os.ReadFile(outPath)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, `// Package testcontract contains wrappers for testcontract contract. require.Equal(t, `// Package testcontract contains wrappers for testcontract contract.
//
// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
package testcontract package testcontract
import ( import (

View file

@ -152,6 +152,8 @@ callflags:
})) }))
const expected = `// Package wrapper contains wrappers for MyContract contract. const expected = `// Package wrapper contains wrappers for MyContract contract.
//
// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
package wrapper package wrapper
import ( import (
@ -266,6 +268,8 @@ func TestGenerateValidPackageName(t *testing.T) {
data, err := os.ReadFile(outFile) data, err := os.ReadFile(outFile)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, `// Package myspacecontract contains wrappers for My space contract contract. require.Equal(t, `// Package myspacecontract contains wrappers for My space contract contract.
//
// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
package myspacecontract package myspacecontract
import ( import (
@ -290,6 +294,8 @@ func Get() int {
data, err = os.ReadFile(outFile) data, err = os.ReadFile(outFile)
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, `// Package myspacecontract contains RPC wrappers for My space contract contract. require.Equal(t, `// Package myspacecontract contains RPC wrappers for My space contract contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package myspacecontract package myspacecontract
import ( import (

View file

@ -1,4 +1,6 @@
// Package gastoken contains RPC wrappers for GasToken contract. // Package gastoken contains RPC wrappers for GasToken contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package gastoken package gastoken
import ( import (

View file

@ -1,4 +1,6 @@
// Package nameservice contains RPC wrappers for NameService contract. // Package nameservice contains RPC wrappers for NameService contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package nameservice package nameservice
import ( import (

View file

@ -1,4 +1,6 @@
// Package nextoken contains RPC wrappers for NEX Token contract. // Package nextoken contains RPC wrappers for NEX Token contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package nextoken package nextoken
import ( import (

View file

@ -1,4 +1,6 @@
// Package nonnepxxcontractwithiterators contains RPC wrappers for Non-NEPXX contract with iterators contract. // Package nonnepxxcontractwithiterators contains RPC wrappers for Non-NEPXX contract with iterators contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package nonnepxxcontractwithiterators package nonnepxxcontractwithiterators
import ( import (

View file

@ -1,4 +1,6 @@
// Package structs contains RPC wrappers for Notifications contract. // Package structs contains RPC wrappers for Notifications contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package structs package structs
import ( import (

View file

@ -1,4 +1,6 @@
// Package structs contains RPC wrappers for Notifications contract. // Package structs contains RPC wrappers for Notifications contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package structs package structs
import ( import (

View file

@ -1,4 +1,6 @@
// Package structs contains RPC wrappers for Notifications contract. // Package structs contains RPC wrappers for Notifications contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package structs package structs
import ( import (

View file

@ -1,4 +1,6 @@
// Package structs contains RPC wrappers for Types contract. // Package structs contains RPC wrappers for Types contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package structs package structs
import ( import (

View file

@ -1,4 +1,6 @@
// Package structs contains RPC wrappers for Types contract. // Package structs contains RPC wrappers for Types contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package structs package structs
import ( import (

View file

@ -1,4 +1,6 @@
// Package types contains RPC wrappers for Types contract. // Package types contains RPC wrappers for Types contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package types package types
import ( import (

View file

@ -1,4 +1,6 @@
// Package types contains RPC wrappers for Types contract. // Package types contains RPC wrappers for Types contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package types package types
import ( import (

View file

@ -1,4 +1,6 @@
// Package verify contains RPC wrappers for verify contract. // Package verify contains RPC wrappers for verify contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package verify package verify
import ( import (

View file

@ -34,6 +34,8 @@ func {{.Name}}({{range $index, $arg := .Arguments -}}
} }
{{- end -}} {{- end -}}
// Package {{.PackageName}} contains wrappers for {{.ContractName}} contract. // Package {{.PackageName}} contains wrappers for {{.ContractName}} contract.
//
// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
package {{.PackageName}} package {{.PackageName}}
import ( import (

View file

@ -113,6 +113,8 @@ func (c *Contract) {{.Name}}Unsigned({{range $index, $arg := .Arguments -}}
{{end}}` {{end}}`
bindingDefinition = `// Package {{.PackageName}} contains RPC wrappers for {{.ContractName}} contract. bindingDefinition = `// Package {{.PackageName}} contains RPC wrappers for {{.ContractName}} contract.
//
// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
package {{.PackageName}} package {{.PackageName}}
import ( import (

View file

@ -75,7 +75,7 @@ const (
// to see how to verify proofs via the Verifier contract: // to see how to verify proofs via the Verifier contract:
// https://github.com/nspcc-dev/neo-go/tree/master/examples/zkp/cubic_circuit. // https://github.com/nspcc-dev/neo-go/tree/master/examples/zkp/cubic_circuit.
// //
// This contract is automatically generated. // Code generated by neo-go zkpbinding.GenerateVerifier; DO NOT EDIT.
package main package main
import ( import (