File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -318,19 +318,16 @@ export function asContractParamType(type: tsm.Type): sc.ContractParamType {
318318
319319 const typeSymbol = type . getAliasSymbol ( ) ?? type . getSymbol ( ) ;
320320 const typeFQN = typeSymbol ?. getFullyQualifiedName ( ) ;
321- if ( typeFQN === "global.ByteString" ) {
322- return sc . ContractParamType . ByteArray ;
323- }
324321
325- if ( typeFQN === "Iterator" ) {
326- return sc . ContractParamType . InteropInterface ;
327- }
328-
329- if ( typeFQN === "Map" ) {
330- return sc . ContractParamType . Map ;
322+ switch ( typeFQN ) {
323+ case "global.ByteString" : return sc . ContractParamType . ByteArray ;
324+ case "global.Hash160" : return sc . ContractParamType . Hash160 ;
325+ case "global.Hash256" : return sc . ContractParamType . Hash256 ;
326+ case "global.ECPoint" : return sc . ContractParamType . PublicKey ;
327+ case "Iterator" : return sc . ContractParamType . InteropInterface ;
328+ case "Map" : return sc . ContractParamType . Map ;
329+ default : return sc . ContractParamType . Any ;
331330 }
332-
333- return sc . ContractParamType . Any ;
334331}
335332
336333export function asReturnType ( type : tsm . Type ) {
You can’t perform that action at this time.
0 commit comments