@@ -604,11 +604,13 @@ func (g *Generator) RenderInvocationOrderList(simpleMethods []string) (string, e
604604 InterfaceOrder []interfaceDescription
605605 KnownHashes map [string ]interfaceDescription
606606 Inheritance map [string ]string
607+ TransformTo map [string ]string
607608 IntMsgs , ExtInMsgs , ExtOutMsgs map [string ][]string
608609 }{
609610 Interfaces : map [string ]string {},
610611 KnownHashes : map [string ]interfaceDescription {},
611612 Inheritance : map [string ]string {},
613+ TransformTo : map [string ]string {},
612614 IntMsgs : map [string ][]string {},
613615 ExtInMsgs : map [string ][]string {},
614616 ExtOutMsgs : map [string ][]string {},
@@ -633,6 +635,7 @@ func (g *Generator) RenderInvocationOrderList(simpleMethods []string) (string, e
633635 descriptions [invokeFnName ] = desc
634636 }
635637
638+ transformTo := map [string ]string {}
636639 inheritance := map [string ]string {} // interface name -> parent interface
637640 methodsByIface := map [string ]map [string ]string {} // interface name -> method name -> result name
638641
@@ -642,6 +645,9 @@ func (g *Generator) RenderInvocationOrderList(simpleMethods []string) (string, e
642645 if iface .Inherits != "" {
643646 inheritance [ifaceName ] = utils .ToCamelCase (iface .Inherits )
644647 }
648+ if iface .TransformTo != "" {
649+ transformTo [ifaceName ] = utils .ToCamelCase (iface .TransformTo )
650+ }
645651 for _ , method := range iface .Methods {
646652 if ! slices .Contains (simpleMethods , method .Name ) {
647653 continue
@@ -657,6 +663,7 @@ func (g *Generator) RenderInvocationOrderList(simpleMethods []string) (string, e
657663 methodsByIface [ifaceName ][methodName ] = resultName
658664 }
659665 }
666+ context .TransformTo = transformTo
660667 context .Inheritance = inheritance
661668
662669 for _ , iface := range g .abi .Interfaces {
@@ -669,8 +676,12 @@ func (g *Generator) RenderInvocationOrderList(simpleMethods []string) (string, e
669676 ifaceMethods [methodName ] = resultName
670677 }
671678 }
679+ ifaceDescrName := ifaceName
680+ if transformToName , ok := context .TransformTo [ifaceName ]; ok {
681+ ifaceDescrName = transformToName
682+ }
672683 description := interfaceDescription {
673- Name : ifaceName ,
684+ Name : ifaceDescrName ,
674685 }
675686 methodNames := maps .Keys (ifaceMethods )
676687 sort .Strings (methodNames )
0 commit comments