mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-27 05:42:56 +00:00
compiler: lowercase the first letter of methods in manifest
In order to be compatable with NEP5 standards and C# node we have to keep the first letter of each manifest method lowercased.
This commit is contained in:
parent
f37831d173
commit
2200f7ff71
2 changed files with 8 additions and 8 deletions
|
@ -269,7 +269,7 @@ func (m *MethodDebugInfo) ToManifestMethod() (manifest.Method, error) {
|
|||
if err != nil {
|
||||
return result, err
|
||||
}
|
||||
result.Name = m.Name.Name
|
||||
result.Name = strings.ToLower(string(m.Name.Name[0])) + m.Name.Name[1:]
|
||||
result.Parameters = parameters
|
||||
result.ReturnType = returnType
|
||||
return result, nil
|
||||
|
|
|
@ -133,7 +133,7 @@ func unexportedMethod() int { return 1 }
|
|||
ABI: manifest.ABI{
|
||||
Hash: hash.Hash160(buf),
|
||||
EntryPoint: manifest.Method{
|
||||
Name: "Main",
|
||||
Name: "main",
|
||||
Parameters: []manifest.Parameter{
|
||||
{
|
||||
Name: "op",
|
||||
|
@ -144,7 +144,7 @@ func unexportedMethod() int { return 1 }
|
|||
},
|
||||
Methods: []manifest.Method{
|
||||
{
|
||||
Name: "MethodInt",
|
||||
Name: "methodInt",
|
||||
Parameters: []manifest.Parameter{
|
||||
{
|
||||
Name: "a",
|
||||
|
@ -154,27 +154,27 @@ func unexportedMethod() int { return 1 }
|
|||
ReturnType: smartcontract.IntegerType,
|
||||
},
|
||||
{
|
||||
Name: "MethodString",
|
||||
Name: "methodString",
|
||||
Parameters: []manifest.Parameter{},
|
||||
ReturnType: smartcontract.StringType,
|
||||
},
|
||||
{
|
||||
Name: "MethodByteArray",
|
||||
Name: "methodByteArray",
|
||||
Parameters: []manifest.Parameter{},
|
||||
ReturnType: smartcontract.ByteArrayType,
|
||||
},
|
||||
{
|
||||
Name: "MethodArray",
|
||||
Name: "methodArray",
|
||||
Parameters: []manifest.Parameter{},
|
||||
ReturnType: smartcontract.ArrayType,
|
||||
},
|
||||
{
|
||||
Name: "MethodStruct",
|
||||
Name: "methodStruct",
|
||||
Parameters: []manifest.Parameter{},
|
||||
ReturnType: smartcontract.ArrayType,
|
||||
},
|
||||
{
|
||||
Name: "MethodConcat",
|
||||
Name: "methodConcat",
|
||||
Parameters: []manifest.Parameter{
|
||||
{
|
||||
Name: "a",
|
||||
|
|
Loading…
Reference in a new issue