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)
require.NoError(t, err)
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
import (

View file

@ -152,6 +152,8 @@ callflags:
}))
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
import (
@ -266,6 +268,8 @@ func TestGenerateValidPackageName(t *testing.T) {
data, err := os.ReadFile(outFile)
require.NoError(t, err)
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
import (
@ -290,6 +294,8 @@ func Get() int {
data, err = os.ReadFile(outFile)
require.NoError(t, err)
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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -1,4 +1,6 @@
// 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
import (

View file

@ -34,6 +34,8 @@ func {{.Name}}({{range $index, $arg := .Arguments -}}
}
{{- end -}}
// 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}}
import (

View file

@ -113,6 +113,8 @@ func (c *Contract) {{.Name}}Unsigned({{range $index, $arg := .Arguments -}}
{{end}}`
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}}
import (

View file

@ -75,7 +75,7 @@ const (
// to see how to verify proofs via the Verifier contract:
// 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
import (