func (s *signBeaconProposalState) Decode(data []byte) error {
	var err error
	if len(data) == 0 {
		return errors.New("no data supplied")
	}
	switch data[0] {
	case 0x01:
		if len(data) != 9 {
			return fmt.Errorf("invalid version 1 data size %d", len(data))
		}
		s.Slot = int64(binary.LittleEndian.Uint64(data[1:9]))
	default:
		err = gob.NewDecoder(bytes.NewBuffer(data)).Decode(s)
	}
	return err
}
Decode decodes the proposal state.
package standard
import (
	"bytes"
	"context"
	"encoding/binary"
	"encoding/gob"
	"fmt"
	"github.com/attestantio/dirk/rules"
	"github.com/opentracing/opentracing-go"
	"github.com/pkg/errors"
	e2types "github.com/wealdtech/go-eth2-types/v2"
)
type signBeaconProposalState struct {
	Slot int64
}
func (s *signBeaconProposalState) Encode() []byte {
	data := make([]byte, 1+8)
	data[0] = 0x01
	if s != nil {
		binary.LittleEndian.PutUint64(data[1:9], uint64(s.Slot))
	}
	return data
}