mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-25 13:47:19 +00:00
Merge pull request #3280 from nspcc-dev/do_not_edit
smartcontract: fix DO NOT EDIT warning to autogenerated files
This commit is contained in:
commit
6c88fccc64
17 changed files with 44 additions and 44 deletions
|
@ -176,9 +176,9 @@ 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, `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
|
||||||
//
|
|
||||||
// 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
|
package testcontract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -151,9 +151,9 @@ callflags:
|
||||||
"--hash", h.StringLE(),
|
"--hash", h.StringLE(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
const expected = `// Package wrapper contains wrappers for MyContract contract.
|
const expected = `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
|
||||||
//
|
|
||||||
// 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
|
package wrapper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -267,9 +267,9 @@ 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, `// Code generated by neo-go contract generate-wrapper --manifest <file.json> --out <file.go> --hash <hash> [--config <config>]; DO NOT EDIT.
|
||||||
//
|
|
||||||
// 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
|
package myspacecontract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -293,9 +293,9 @@ 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, `// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
|
||||||
//
|
|
||||||
// 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
|
package myspacecontract
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
4
cli/smartcontract/testdata/gas/gas.go
vendored
4
cli/smartcontract/testdata/gas/gas.go
vendored
|
@ -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.
|
// 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
|
package gastoken
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package nameservice
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
4
cli/smartcontract/testdata/nex/nex.go
vendored
4
cli/smartcontract/testdata/nex/nex.go
vendored
|
@ -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.
|
// 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
|
package nextoken
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
4
cli/smartcontract/testdata/nonepiter/iter.go
vendored
4
cli/smartcontract/testdata/nonepiter/iter.go
vendored
|
@ -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.
|
// 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
|
package nonnepxxcontractwithiterators
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package structs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package structs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package structs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package structs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package structs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -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.
|
// 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
|
package verify
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -33,9 +33,9 @@ func {{.Name}}({{range $index, $arg := .Arguments -}}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
}
|
}
|
||||||
{{- 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.
|
// 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}}
|
package {{.PackageName}}
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -112,9 +112,9 @@ func (c *Contract) {{.Name}}Unsigned({{range $index, $arg := .Arguments -}}
|
||||||
}
|
}
|
||||||
{{end}}`
|
{{end}}`
|
||||||
|
|
||||||
bindingDefinition = `// Package {{.PackageName}} contains RPC wrappers for {{.ContractName}} contract.
|
bindingDefinition = `// Code generated by neo-go contract generate-rpcwrapper --manifest <file.json> --out <file.go> [--hash <hash>] [--config <config>]; DO NOT EDIT.
|
||||||
//
|
|
||||||
// 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}}
|
package {{.PackageName}}
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -60,7 +60,9 @@ const (
|
||||||
// verification contract is circuit-specific, i.e. corresponds to a specific
|
// verification contract is circuit-specific, i.e. corresponds to a specific
|
||||||
// single constraint system. Thus, every new circuit requires vew verification
|
// single constraint system. Thus, every new circuit requires vew verification
|
||||||
// contract to be generated and deployed to the chain.
|
// 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
|
// curves interoperability functionality to verify provided proof against provided
|
||||||
// public input. The contract contains a single 'verifyProof' method that accepts
|
// public input. The contract contains a single 'verifyProof' method that accepts
|
||||||
// a proof represented as three BLS12-381 curve points and public witnesses
|
// 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
|
// go.sum files required for compilation. Please, refer to the NeoGo ZKP example
|
||||||
// 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.
|
||||||
//
|
|
||||||
// Code generated by neo-go zkpbinding.GenerateVerifier; DO NOT EDIT.
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in a new issue