forked from TrueCloudLab/neoneo-go
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 {
|
if err != nil {
|
||||||
return result, err
|
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.Parameters = parameters
|
||||||
result.ReturnType = returnType
|
result.ReturnType = returnType
|
||||||
return result, nil
|
return result, nil
|
||||||
|
|
|
@ -133,7 +133,7 @@ func unexportedMethod() int { return 1 }
|
||||||
ABI: manifest.ABI{
|
ABI: manifest.ABI{
|
||||||
Hash: hash.Hash160(buf),
|
Hash: hash.Hash160(buf),
|
||||||
EntryPoint: manifest.Method{
|
EntryPoint: manifest.Method{
|
||||||
Name: "Main",
|
Name: "main",
|
||||||
Parameters: []manifest.Parameter{
|
Parameters: []manifest.Parameter{
|
||||||
{
|
{
|
||||||
Name: "op",
|
Name: "op",
|
||||||
|
@ -144,7 +144,7 @@ func unexportedMethod() int { return 1 }
|
||||||
},
|
},
|
||||||
Methods: []manifest.Method{
|
Methods: []manifest.Method{
|
||||||
{
|
{
|
||||||
Name: "MethodInt",
|
Name: "methodInt",
|
||||||
Parameters: []manifest.Parameter{
|
Parameters: []manifest.Parameter{
|
||||||
{
|
{
|
||||||
Name: "a",
|
Name: "a",
|
||||||
|
@ -154,27 +154,27 @@ func unexportedMethod() int { return 1 }
|
||||||
ReturnType: smartcontract.IntegerType,
|
ReturnType: smartcontract.IntegerType,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MethodString",
|
Name: "methodString",
|
||||||
Parameters: []manifest.Parameter{},
|
Parameters: []manifest.Parameter{},
|
||||||
ReturnType: smartcontract.StringType,
|
ReturnType: smartcontract.StringType,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MethodByteArray",
|
Name: "methodByteArray",
|
||||||
Parameters: []manifest.Parameter{},
|
Parameters: []manifest.Parameter{},
|
||||||
ReturnType: smartcontract.ByteArrayType,
|
ReturnType: smartcontract.ByteArrayType,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MethodArray",
|
Name: "methodArray",
|
||||||
Parameters: []manifest.Parameter{},
|
Parameters: []manifest.Parameter{},
|
||||||
ReturnType: smartcontract.ArrayType,
|
ReturnType: smartcontract.ArrayType,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MethodStruct",
|
Name: "methodStruct",
|
||||||
Parameters: []manifest.Parameter{},
|
Parameters: []manifest.Parameter{},
|
||||||
ReturnType: smartcontract.ArrayType,
|
ReturnType: smartcontract.ArrayType,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "MethodConcat",
|
Name: "methodConcat",
|
||||||
Parameters: []manifest.Parameter{
|
Parameters: []manifest.Parameter{
|
||||||
{
|
{
|
||||||
Name: "a",
|
Name: "a",
|
||||||
|
|
Loading…
Reference in a new issue