smartcontract: fix DO NOT EDIT warning to autogenerated files

The text must appear as the first line of a properly formatted Go //
comment, and that comment must appear before but not be attached to the
package clause and before any /* */ comment.

Closes #3254

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
Ekaterina Pavlova 2023-12-25 13:01:36 +03:00
parent de98b39a95
commit 1237c719e3
17 changed files with 44 additions and 44 deletions

View file

@ -176,9 +176,9 @@ 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.
require.Equal(t, `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
// Package testcontract contains wrappers for testcontract contract.
package testcontract
import (

View file

@ -151,9 +151,9 @@ callflags:
"--hash", h.StringLE(),
}))
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.
const expected = `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
// Package wrapper contains wrappers for MyContract contract.
package wrapper
import (
@ -267,9 +267,9 @@ 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.
require.Equal(t, `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
// Package myspacecontract contains wrappers for My space contract contract.
package myspacecontract
import (
@ -293,9 +293,9 @@ 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.
require.Equal(t, `// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package myspacecontract contains RPC wrappers for My space contract contract.
package myspacecontract
import (

View file

@ -1,6 +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 contains RPC wrappers for GasToken contract.
package gastoken
import (

View file

@ -1,6 +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 contains RPC wrappers for NameService contract.
package nameservice
import (

View file

@ -1,6 +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 contains RPC wrappers for NEX Token contract.
package nextoken
import (

View file

@ -1,6 +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 contains RPC wrappers for Non-NEPXX contract with iterators contract.
package nonnepxxcontractwithiterators
import (

View file

@ -1,6 +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 contains RPC wrappers for Notifications contract.
package structs
import (

View file

@ -1,6 +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 contains RPC wrappers for Notifications contract.
package structs
import (

View file

@ -1,6 +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 contains RPC wrappers for Notifications contract.
package structs
import (

View file

@ -1,6 +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 contains RPC wrappers for Types contract.
package structs
import (

View file

@ -1,6 +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 contains RPC wrappers for Types contract.
package structs
import (

View file

@ -1,6 +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 contains RPC wrappers for Types contract.
package types
import (

View file

@ -1,6 +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 contains RPC wrappers for Types contract.
package types
import (

View file

@ -1,6 +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 contains RPC wrappers for verify contract.
package verify
import (

View file

@ -33,9 +33,9 @@ func {{.Name}}({{range $index, $arg := .Arguments -}}
{{- end}}
}
{{- 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}} contains wrappers for {{.ContractName}} contract.
package {{.PackageName}}
import (

View file

@ -112,9 +112,9 @@ 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.
bindingDefinition = `// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
// Package {{.PackageName}} contains RPC wrappers for {{.ContractName}} contract.
package {{.PackageName}}
import (

View file

@ -60,7 +60,9 @@ const (
// verification contract is circuit-specific, i.e. corresponds to a specific
// single constraint system. Thus, every new circuit requires vew verification
// contract to be generated and deployed to the chain.
goVerificationTmpl = `// Package main contains verification smart contract that uses Neo BLS12-381
goVerificationTmpl = `//Code generated by neo-go zkpbinding.GenerateVerifier; DO NOT EDIT.
// Package main contains verification smart contract that uses Neo BLS12-381
// curves interoperability functionality to verify provided proof against provided
// public input. The contract contains a single 'verifyProof' method that accepts
// a proof represented as three BLS12-381 curve points and public witnesses
@ -74,8 +76,6 @@ const (
// go.sum files required for compilation. Please, refer to the NeoGo ZKP example
// to see how to verify proofs via the Verifier contract:
// https://github.com/nspcc-dev/neo-go/tree/master/examples/zkp/cubic_circuit.
//
// Code generated by neo-go zkpbinding.GenerateVerifier; DO NOT EDIT.
package main
import (