Skip to content

Commit

Permalink
Fix ContractEventDescriptor (#1733)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored Jun 29, 2020
1 parent ae06696 commit 0874537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
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

0 comments on commit 0874537

Please sign in to comment.