code: func SpecFromStructReflect(fname string, args reflect.Type, rets reflect.Type) *FunctionSpec {
  	s := FunctionSpec{
  		Inputs:  make([]Argument, args.NumField()),
  		Outputs: make([]Argument, rets.NumField()),
  	}
  	for i := 0; i < args.NumField(); i++ {
  		f := args.Field(i)
  		a := EVMTypeFromReflect(f.Type)
  		a.Name = f.Name
  		s.Inputs[i] = a
  	}
  	for i := 0; i < rets.NumField(); i++ {
  		f := rets.Field(i)
  		a := EVMTypeFromReflect(f.Type)
  		a.Name = f.Name
  		s.Outputs[i] = a
  	}
  	s.SetFunctionID(fname)
  
  	return &s
  }
docs: // SpecFromStructReflect generates a FunctionSpec where the arguments and return values are
  // described a struct. Both args and rets should be set to the return value of reflect.TypeOf()
  // with the respective struct as an argument.