Skip to content

Commit

Permalink
handle more parameter types
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry committed Jun 22, 2021
1 parent 7d61e9c commit 90c3f1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/build-tasks/ContractGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ public static string GenerateContractInterface(NeoManifest manifest, string @nam
static string ConvertParameterType(string parameterType) => parameterType switch
{
"Any" => "object",
"Array" => "object[]",
"Array" => "Neo.VM.Types.Array",
"Boolean" => "bool",
"ByteArray" => "byte[]",
"Hash160" => "Neo.UInt160",
"Hash256" => "Neo.UInt256",
"Integer" => "System.Numerics.BigInteger",
"InteropInterface" => throw new InvalidOperationException("InteropInterface parameter type not supported"),
"InteropInterface" => "Neo.VM.Types.InteropInterface",
"PublicKey" => "Neo.Cryptography.ECC.ECPoint",
"Map" => throw new NotImplementedException("Map parameter type not implemented"),
"Signature" => throw new NotImplementedException("Signature parameter type not implemented"),
"Map" => "Neo.VM.Types.Map",
"Signature" => "Neo.VM.Types.ByteString",
"String" => "string",
"Void" => "void",
_ => throw new FormatException($"Invalid parameter type {parameterType}")
Expand Down

0 comments on commit 90c3f1f

Please sign in to comment.