File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -586,24 +586,20 @@ func goType(
586586 return reflect .ArrayOf (stdlib .EVMBytes32Length , reflect .TypeOf (byte (0 ))), true
587587 }
588588
589- // This check for Cadence structs, has to be after the above checks,
590- // which are also structs defined in the EVM system contract:
589+ gethABIType , ok := gethABIType (
590+ context ,
591+ staticType ,
592+ evmTypeIDs ,
593+ )
594+ // All user-defined Cadence structs, are ABI encoded/decoded as Solidity tuples.
595+ // Except for the structs defined in the EVM system contract:
591596 // - `EVM.EVMAddress`
592597 // - `EVM.EVMBytes`
593598 // - `EVM.EVMBytes4`
594599 // - `EVM.EVMBytes32`
595- semaType := interpreter .MustConvertStaticToSemaType (staticType , context )
596- if compositeType := asTupleEncodableCompositeType (semaType ); compositeType != nil {
597- tupleGethABIType , ok := gethABIType (
598- context ,
599- staticType ,
600- evmTypeIDs ,
601- )
602- if ! ok {
603- return nil , false
604- }
605-
606- return tupleGethABIType .TupleType , true
600+ // These have their own ABI encoding/decoding format.
601+ if ok && gethABIType .T == gethABI .TupleTy {
602+ return gethABIType .TupleType , true
607603 }
608604
609605 return nil , false
You can’t perform that action at this time.
0 commit comments