Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ContractEventDescriptor #1733

Merged
merged 1 commit into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/neo/SmartContract/Manifest/ContractEventDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ public ContractEventDescriptor Clone()
}

/// <summary>
/// Parse ContractMethodDescription from json
/// Parse ContractEventDescriptor from json
/// </summary>
/// <param name="json">Json</param>
/// <returns>Return ContractMethodDescription</returns>
public static ContractMethodDescriptor FromJson(JObject json)
/// <returns>Return ContractEventDescriptor</returns>
public static ContractEventDescriptor FromJson(JObject json)
{
return new ContractMethodDescriptor
return new ContractEventDescriptor
{
Name = json["name"].AsString(),
Parameters = ((JArray)json["parameters"]).Select(u => ContractParameterDefinition.FromJson(u)).ToArray(),
Expand Down
5 changes: 2 additions & 3 deletions src/neo/SmartContract/Native/Tokens/Nep5Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected Nep5Token()

var events = new List<ContractEventDescriptor>(Manifest.Abi.Events)
{
new ContractMethodDescriptor()
new ContractEventDescriptor
{
Name = "Transfer",
Parameters = new ContractParameterDefinition[]
Expand All @@ -51,8 +51,7 @@ protected Nep5Token()
Name = "amount",
Type = ContractParameterType.Integer
}
},
ReturnType = ContractParameterType.Boolean
}
}
};

Expand Down