public static void Decode <TItem>(AbiTypeInfo solidityType, ref AbiDecodeBuffer buff, out TItem val) { var encoder = EncoderFactory.LoadEncoder(solidityType); encoder.SetTypeInfo(solidityType); encoder.DecodeObject(ref buff, out var objectVal); val = (TItem)objectVal; }
public static DecodeDelegate <TItem> GetDecoder <TItem>(AbiTypeInfo solidityType) { var encoder = EncoderFactory.LoadEncoder(solidityType); encoder.SetTypeInfo(solidityType); void Decode(AbiTypeInfo st, ref AbiDecodeBuffer buff, out TItem val) { encoder.DecodeObject(ref buff, out var objectVal); val = (TItem)objectVal; } return(Decode); }