Skip to content
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
9 changes: 9 additions & 0 deletions src/Plugins/RpcServer/ParameterConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ internal static Address ToAddress(this JToken token, byte version)
return new Address(scriptHash, version);
}

internal static Address[] ToAddresses(this JToken token, byte version)
{
if (token is null) return null;
if (token is not JArray array)
throw new RpcException(RpcError.InvalidParams.WithData($"Invalid Addresses: {token}"));

return array.Select(p => ToAddress(p, version)).ToArray();
}

private static ContractParameter[] ToContractParameters(this JToken token)
{
if (token is null) return null;
Expand Down
Loading
Loading