// Code generated by fastssz. DO NOT EDIT.
package eth

import (
	github_com_OffchainLabs_prysm_v7_consensus_types_primitives "github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
	v1 "github.com/OffchainLabs/prysm/v7/proto/engine/v1"
	ssz "github.com/prysmaticlabs/fastssz"
)

// MarshalSSZ ssz marshals the ExecutionPayloadBid object
func (e *ExecutionPayloadBid) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(e)
}

// MarshalSSZTo ssz marshals the ExecutionPayloadBid object to a target array
func (e *ExecutionPayloadBid) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'ParentBlockHash'
	if size := len(e.ParentBlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentBlockHash", size, 32)
		return
	}
	dst = append(dst, e.ParentBlockHash...)

	// Field (1) 'ParentBlockRoot'
	if size := len(e.ParentBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentBlockRoot", size, 32)
		return
	}
	dst = append(dst, e.ParentBlockRoot...)

	// Field (2) 'BlockHash'
	if size := len(e.BlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BlockHash", size, 32)
		return
	}
	dst = append(dst, e.BlockHash...)

	// Field (3) 'FeeRecipient'
	if size := len(e.FeeRecipient); size != 20 {
		err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
		return
	}
	dst = append(dst, e.FeeRecipient...)

	// Field (4) 'GasLimit'
	dst = ssz.MarshalUint64(dst, e.GasLimit)

	// Field (5) 'BuilderIndex'
	dst = ssz.MarshalUint64(dst, uint64(e.BuilderIndex))

	// Field (6) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(e.Slot))

	// Field (7) 'Value'
	dst = ssz.MarshalUint64(dst, uint64(e.Value))

	// Field (8) 'BlobKzgCommitmentsRoot'
	if size := len(e.BlobKzgCommitmentsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BlobKzgCommitmentsRoot", size, 32)
		return
	}
	dst = append(dst, e.BlobKzgCommitmentsRoot...)

	return
}

// UnmarshalSSZ ssz unmarshals the ExecutionPayloadBid object
func (e *ExecutionPayloadBid) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 180 {
		return ssz.ErrSize
	}

	// Field (0) 'ParentBlockHash'
	if cap(e.ParentBlockHash) == 0 {
		e.ParentBlockHash = make([]byte, 0, len(buf[0:32]))
	}
	e.ParentBlockHash = append(e.ParentBlockHash, buf[0:32]...)

	// Field (1) 'ParentBlockRoot'
	if cap(e.ParentBlockRoot) == 0 {
		e.ParentBlockRoot = make([]byte, 0, len(buf[32:64]))
	}
	e.ParentBlockRoot = append(e.ParentBlockRoot, buf[32:64]...)

	// Field (2) 'BlockHash'
	if cap(e.BlockHash) == 0 {
		e.BlockHash = make([]byte, 0, len(buf[64:96]))
	}
	e.BlockHash = append(e.BlockHash, buf[64:96]...)

	// Field (3) 'FeeRecipient'
	if cap(e.FeeRecipient) == 0 {
		e.FeeRecipient = make([]byte, 0, len(buf[96:116]))
	}
	e.FeeRecipient = append(e.FeeRecipient, buf[96:116]...)

	// Field (4) 'GasLimit'
	e.GasLimit = ssz.UnmarshallUint64(buf[116:124])

	// Field (5) 'BuilderIndex'
	e.BuilderIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[124:132]))

	// Field (6) 'Slot'
	e.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[132:140]))

	// Field (7) 'Value'
	e.Value = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[140:148]))

	// Field (8) 'BlobKzgCommitmentsRoot'
	if cap(e.BlobKzgCommitmentsRoot) == 0 {
		e.BlobKzgCommitmentsRoot = make([]byte, 0, len(buf[148:180]))
	}
	e.BlobKzgCommitmentsRoot = append(e.BlobKzgCommitmentsRoot, buf[148:180]...)

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the ExecutionPayloadBid object
func (e *ExecutionPayloadBid) SizeSSZ() (size int) {
	size = 180
	return
}

// HashTreeRoot ssz hashes the ExecutionPayloadBid object
func (e *ExecutionPayloadBid) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(e)
}

// HashTreeRootWith ssz hashes the ExecutionPayloadBid object with a hasher
func (e *ExecutionPayloadBid) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'ParentBlockHash'
	if size := len(e.ParentBlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentBlockHash", size, 32)
		return
	}
	hh.PutBytes(e.ParentBlockHash)

	// Field (1) 'ParentBlockRoot'
	if size := len(e.ParentBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentBlockRoot", size, 32)
		return
	}
	hh.PutBytes(e.ParentBlockRoot)

	// Field (2) 'BlockHash'
	if size := len(e.BlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BlockHash", size, 32)
		return
	}
	hh.PutBytes(e.BlockHash)

	// Field (3) 'FeeRecipient'
	if size := len(e.FeeRecipient); size != 20 {
		err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
		return
	}
	hh.PutBytes(e.FeeRecipient)

	// Field (4) 'GasLimit'
	hh.PutUint64(e.GasLimit)

	// Field (5) 'BuilderIndex'
	hh.PutUint64(uint64(e.BuilderIndex))

	// Field (6) 'Slot'
	hh.PutUint64(uint64(e.Slot))

	// Field (7) 'Value'
	hh.PutUint64(uint64(e.Value))

	// Field (8) 'BlobKzgCommitmentsRoot'
	if size := len(e.BlobKzgCommitmentsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BlobKzgCommitmentsRoot", size, 32)
		return
	}
	hh.PutBytes(e.BlobKzgCommitmentsRoot)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the SignedExecutionPayloadBid object
func (s *SignedExecutionPayloadBid) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(s)
}

// MarshalSSZTo ssz marshals the SignedExecutionPayloadBid object to a target array
func (s *SignedExecutionPayloadBid) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'Message'
	if s.Message == nil {
		s.Message = new(ExecutionPayloadBid)
	}
	if dst, err = s.Message.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	dst = append(dst, s.Signature...)

	return
}

// UnmarshalSSZ ssz unmarshals the SignedExecutionPayloadBid object
func (s *SignedExecutionPayloadBid) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 276 {
		return ssz.ErrSize
	}

	// Field (0) 'Message'
	if s.Message == nil {
		s.Message = new(ExecutionPayloadBid)
	}
	if err = s.Message.UnmarshalSSZ(buf[0:180]); err != nil {
		return err
	}

	// Field (1) 'Signature'
	if cap(s.Signature) == 0 {
		s.Signature = make([]byte, 0, len(buf[180:276]))
	}
	s.Signature = append(s.Signature, buf[180:276]...)

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the SignedExecutionPayloadBid object
func (s *SignedExecutionPayloadBid) SizeSSZ() (size int) {
	size = 276
	return
}

// HashTreeRoot ssz hashes the SignedExecutionPayloadBid object
func (s *SignedExecutionPayloadBid) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(s)
}

// HashTreeRootWith ssz hashes the SignedExecutionPayloadBid object with a hasher
func (s *SignedExecutionPayloadBid) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Message'
	if err = s.Message.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	hh.PutBytes(s.Signature)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the PayloadAttestationData object
func (p *PayloadAttestationData) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(p)
}

// MarshalSSZTo ssz marshals the PayloadAttestationData object to a target array
func (p *PayloadAttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'BeaconBlockRoot'
	if size := len(p.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	dst = append(dst, p.BeaconBlockRoot...)

	// Field (1) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(p.Slot))

	// Field (2) 'PayloadPresent'
	dst = ssz.MarshalBool(dst, p.PayloadPresent)

	// Field (3) 'BlobDataAvailable'
	dst = ssz.MarshalBool(dst, p.BlobDataAvailable)

	return
}

// UnmarshalSSZ ssz unmarshals the PayloadAttestationData object
func (p *PayloadAttestationData) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 42 {
		return ssz.ErrSize
	}

	// Field (0) 'BeaconBlockRoot'
	if cap(p.BeaconBlockRoot) == 0 {
		p.BeaconBlockRoot = make([]byte, 0, len(buf[0:32]))
	}
	p.BeaconBlockRoot = append(p.BeaconBlockRoot, buf[0:32]...)

	// Field (1) 'Slot'
	p.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[32:40]))

	// Field (2) 'PayloadPresent'
	p.PayloadPresent, err = ssz.DecodeBool(buf[40:41])
	if err != nil {
		return err
	}

	// Field (3) 'BlobDataAvailable'
	p.BlobDataAvailable, err = ssz.DecodeBool(buf[41:42])
	if err != nil {
		return err
	}

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationData object
func (p *PayloadAttestationData) SizeSSZ() (size int) {
	size = 42
	return
}

// HashTreeRoot ssz hashes the PayloadAttestationData object
func (p *PayloadAttestationData) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(p)
}

// HashTreeRootWith ssz hashes the PayloadAttestationData object with a hasher
func (p *PayloadAttestationData) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'BeaconBlockRoot'
	if size := len(p.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	hh.PutBytes(p.BeaconBlockRoot)

	// Field (1) 'Slot'
	hh.PutUint64(uint64(p.Slot))

	// Field (2) 'PayloadPresent'
	hh.PutBool(p.PayloadPresent)

	// Field (3) 'BlobDataAvailable'
	hh.PutBool(p.BlobDataAvailable)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the PayloadAttestation object
func (p *PayloadAttestation) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(p)
}

// MarshalSSZTo ssz marshals the PayloadAttestation object to a target array
func (p *PayloadAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'AggregationBits'
	if size := len(p.AggregationBits); size != 64 {
		err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64)
		return
	}
	dst = append(dst, p.AggregationBits...)

	// Field (1) 'Data'
	if p.Data == nil {
		p.Data = new(PayloadAttestationData)
	}
	if dst, err = p.Data.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (2) 'Signature'
	if size := len(p.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	dst = append(dst, p.Signature...)

	return
}

// UnmarshalSSZ ssz unmarshals the PayloadAttestation object
func (p *PayloadAttestation) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 202 {
		return ssz.ErrSize
	}

	// Field (0) 'AggregationBits'
	if cap(p.AggregationBits) == 0 {
		p.AggregationBits = make([]byte, 0, len(buf[0:64]))
	}
	p.AggregationBits = append(p.AggregationBits, buf[0:64]...)

	// Field (1) 'Data'
	if p.Data == nil {
		p.Data = new(PayloadAttestationData)
	}
	if err = p.Data.UnmarshalSSZ(buf[64:106]); err != nil {
		return err
	}

	// Field (2) 'Signature'
	if cap(p.Signature) == 0 {
		p.Signature = make([]byte, 0, len(buf[106:202]))
	}
	p.Signature = append(p.Signature, buf[106:202]...)

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestation object
func (p *PayloadAttestation) SizeSSZ() (size int) {
	size = 202
	return
}

// HashTreeRoot ssz hashes the PayloadAttestation object
func (p *PayloadAttestation) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(p)
}

// HashTreeRootWith ssz hashes the PayloadAttestation object with a hasher
func (p *PayloadAttestation) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'AggregationBits'
	if size := len(p.AggregationBits); size != 64 {
		err = ssz.ErrBytesLengthFn("--.AggregationBits", size, 64)
		return
	}
	hh.PutBytes(p.AggregationBits)

	// Field (1) 'Data'
	if err = p.Data.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (2) 'Signature'
	if size := len(p.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	hh.PutBytes(p.Signature)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the PayloadAttestationMessage object
func (p *PayloadAttestationMessage) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(p)
}

// MarshalSSZTo ssz marshals the PayloadAttestationMessage object to a target array
func (p *PayloadAttestationMessage) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'ValidatorIndex'
	dst = ssz.MarshalUint64(dst, uint64(p.ValidatorIndex))

	// Field (1) 'Data'
	if p.Data == nil {
		p.Data = new(PayloadAttestationData)
	}
	if dst, err = p.Data.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (2) 'Signature'
	if size := len(p.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	dst = append(dst, p.Signature...)

	return
}

// UnmarshalSSZ ssz unmarshals the PayloadAttestationMessage object
func (p *PayloadAttestationMessage) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 146 {
		return ssz.ErrSize
	}

	// Field (0) 'ValidatorIndex'
	p.ValidatorIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[0:8]))

	// Field (1) 'Data'
	if p.Data == nil {
		p.Data = new(PayloadAttestationData)
	}
	if err = p.Data.UnmarshalSSZ(buf[8:50]); err != nil {
		return err
	}

	// Field (2) 'Signature'
	if cap(p.Signature) == 0 {
		p.Signature = make([]byte, 0, len(buf[50:146]))
	}
	p.Signature = append(p.Signature, buf[50:146]...)

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the PayloadAttestationMessage object
func (p *PayloadAttestationMessage) SizeSSZ() (size int) {
	size = 146
	return
}

// HashTreeRoot ssz hashes the PayloadAttestationMessage object
func (p *PayloadAttestationMessage) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(p)
}

// HashTreeRootWith ssz hashes the PayloadAttestationMessage object with a hasher
func (p *PayloadAttestationMessage) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'ValidatorIndex'
	hh.PutUint64(uint64(p.ValidatorIndex))

	// Field (1) 'Data'
	if err = p.Data.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (2) 'Signature'
	if size := len(p.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	hh.PutBytes(p.Signature)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the BeaconBlockGloas object
func (b *BeaconBlockGloas) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(b)
}

// MarshalSSZTo ssz marshals the BeaconBlockGloas object to a target array
func (b *BeaconBlockGloas) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(84)

	// Field (0) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(b.Slot))

	// Field (1) 'ProposerIndex'
	dst = ssz.MarshalUint64(dst, uint64(b.ProposerIndex))

	// Field (2) 'ParentRoot'
	if size := len(b.ParentRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentRoot", size, 32)
		return
	}
	dst = append(dst, b.ParentRoot...)

	// Field (3) 'StateRoot'
	if size := len(b.StateRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32)
		return
	}
	dst = append(dst, b.StateRoot...)

	// Offset (4) 'Body'
	dst = ssz.WriteOffset(dst, offset)
	if b.Body == nil {
		b.Body = new(BeaconBlockBodyGloas)
	}
	offset += b.Body.SizeSSZ()

	// Field (4) 'Body'
	if dst, err = b.Body.MarshalSSZTo(dst); err != nil {
		return
	}

	return
}

// UnmarshalSSZ ssz unmarshals the BeaconBlockGloas object
func (b *BeaconBlockGloas) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 84 {
		return ssz.ErrSize
	}

	tail := buf
	var o4 uint64

	// Field (0) 'Slot'
	b.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[0:8]))

	// Field (1) 'ProposerIndex'
	b.ProposerIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[8:16]))

	// Field (2) 'ParentRoot'
	if cap(b.ParentRoot) == 0 {
		b.ParentRoot = make([]byte, 0, len(buf[16:48]))
	}
	b.ParentRoot = append(b.ParentRoot, buf[16:48]...)

	// Field (3) 'StateRoot'
	if cap(b.StateRoot) == 0 {
		b.StateRoot = make([]byte, 0, len(buf[48:80]))
	}
	b.StateRoot = append(b.StateRoot, buf[48:80]...)

	// Offset (4) 'Body'
	if o4 = ssz.ReadOffset(buf[80:84]); o4 > size {
		return ssz.ErrOffset
	}

	if o4 != 84 {
		return ssz.ErrInvalidVariableOffset
	}

	// Field (4) 'Body'
	{
		buf = tail[o4:]
		if b.Body == nil {
			b.Body = new(BeaconBlockBodyGloas)
		}
		if err = b.Body.UnmarshalSSZ(buf); err != nil {
			return err
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlockGloas object
func (b *BeaconBlockGloas) SizeSSZ() (size int) {
	size = 84

	// Field (4) 'Body'
	if b.Body == nil {
		b.Body = new(BeaconBlockBodyGloas)
	}
	size += b.Body.SizeSSZ()

	return
}

// HashTreeRoot ssz hashes the BeaconBlockGloas object
func (b *BeaconBlockGloas) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(b)
}

// HashTreeRootWith ssz hashes the BeaconBlockGloas object with a hasher
func (b *BeaconBlockGloas) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Slot'
	hh.PutUint64(uint64(b.Slot))

	// Field (1) 'ProposerIndex'
	hh.PutUint64(uint64(b.ProposerIndex))

	// Field (2) 'ParentRoot'
	if size := len(b.ParentRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.ParentRoot", size, 32)
		return
	}
	hh.PutBytes(b.ParentRoot)

	// Field (3) 'StateRoot'
	if size := len(b.StateRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32)
		return
	}
	hh.PutBytes(b.StateRoot)

	// Field (4) 'Body'
	if err = b.Body.HashTreeRootWith(hh); err != nil {
		return
	}

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the BeaconBlockBodyGloas object
func (b *BeaconBlockBodyGloas) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(b)
}

// MarshalSSZTo ssz marshals the BeaconBlockBodyGloas object to a target array
func (b *BeaconBlockBodyGloas) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(664)

	// Field (0) 'RandaoReveal'
	if size := len(b.RandaoReveal); size != 96 {
		err = ssz.ErrBytesLengthFn("--.RandaoReveal", size, 96)
		return
	}
	dst = append(dst, b.RandaoReveal...)

	// Field (1) 'Eth1Data'
	if b.Eth1Data == nil {
		b.Eth1Data = new(Eth1Data)
	}
	if dst, err = b.Eth1Data.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (2) 'Graffiti'
	if size := len(b.Graffiti); size != 32 {
		err = ssz.ErrBytesLengthFn("--.Graffiti", size, 32)
		return
	}
	dst = append(dst, b.Graffiti...)

	// Offset (3) 'ProposerSlashings'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.ProposerSlashings) * 416

	// Offset (4) 'AttesterSlashings'
	dst = ssz.WriteOffset(dst, offset)
	for ii := 0; ii < len(b.AttesterSlashings); ii++ {
		offset += 4
		offset += b.AttesterSlashings[ii].SizeSSZ()
	}

	// Offset (5) 'Attestations'
	dst = ssz.WriteOffset(dst, offset)
	for ii := 0; ii < len(b.Attestations); ii++ {
		offset += 4
		offset += b.Attestations[ii].SizeSSZ()
	}

	// Offset (6) 'Deposits'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.Deposits) * 1240

	// Offset (7) 'VoluntaryExits'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.VoluntaryExits) * 112

	// Field (8) 'SyncAggregate'
	if b.SyncAggregate == nil {
		b.SyncAggregate = new(SyncAggregate)
	}
	if dst, err = b.SyncAggregate.MarshalSSZTo(dst); err != nil {
		return
	}

	// Offset (9) 'BlsToExecutionChanges'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.BlsToExecutionChanges) * 172

	// Field (10) 'SignedExecutionPayloadBid'
	if b.SignedExecutionPayloadBid == nil {
		b.SignedExecutionPayloadBid = new(SignedExecutionPayloadBid)
	}
	if dst, err = b.SignedExecutionPayloadBid.MarshalSSZTo(dst); err != nil {
		return
	}

	// Offset (11) 'PayloadAttestations'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.PayloadAttestations) * 202

	// Field (3) 'ProposerSlashings'
	if size := len(b.ProposerSlashings); size > 16 {
		err = ssz.ErrListTooBigFn("--.ProposerSlashings", size, 16)
		return
	}
	for ii := 0; ii < len(b.ProposerSlashings); ii++ {
		if dst, err = b.ProposerSlashings[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (4) 'AttesterSlashings'
	if size := len(b.AttesterSlashings); size > 1 {
		err = ssz.ErrListTooBigFn("--.AttesterSlashings", size, 1)
		return
	}
	{
		offset = 4 * len(b.AttesterSlashings)
		for ii := 0; ii < len(b.AttesterSlashings); ii++ {
			dst = ssz.WriteOffset(dst, offset)
			offset += b.AttesterSlashings[ii].SizeSSZ()
		}
	}
	for ii := 0; ii < len(b.AttesterSlashings); ii++ {
		if dst, err = b.AttesterSlashings[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (5) 'Attestations'
	if size := len(b.Attestations); size > 8 {
		err = ssz.ErrListTooBigFn("--.Attestations", size, 8)
		return
	}
	{
		offset = 4 * len(b.Attestations)
		for ii := 0; ii < len(b.Attestations); ii++ {
			dst = ssz.WriteOffset(dst, offset)
			offset += b.Attestations[ii].SizeSSZ()
		}
	}
	for ii := 0; ii < len(b.Attestations); ii++ {
		if dst, err = b.Attestations[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (6) 'Deposits'
	if size := len(b.Deposits); size > 16 {
		err = ssz.ErrListTooBigFn("--.Deposits", size, 16)
		return
	}
	for ii := 0; ii < len(b.Deposits); ii++ {
		if dst, err = b.Deposits[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (7) 'VoluntaryExits'
	if size := len(b.VoluntaryExits); size > 16 {
		err = ssz.ErrListTooBigFn("--.VoluntaryExits", size, 16)
		return
	}
	for ii := 0; ii < len(b.VoluntaryExits); ii++ {
		if dst, err = b.VoluntaryExits[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (9) 'BlsToExecutionChanges'
	if size := len(b.BlsToExecutionChanges); size > 16 {
		err = ssz.ErrListTooBigFn("--.BlsToExecutionChanges", size, 16)
		return
	}
	for ii := 0; ii < len(b.BlsToExecutionChanges); ii++ {
		if dst, err = b.BlsToExecutionChanges[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (11) 'PayloadAttestations'
	if size := len(b.PayloadAttestations); size > 4 {
		err = ssz.ErrListTooBigFn("--.PayloadAttestations", size, 4)
		return
	}
	for ii := 0; ii < len(b.PayloadAttestations); ii++ {
		if dst, err = b.PayloadAttestations[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	return
}

// UnmarshalSSZ ssz unmarshals the BeaconBlockBodyGloas object
func (b *BeaconBlockBodyGloas) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 664 {
		return ssz.ErrSize
	}

	tail := buf
	var o3, o4, o5, o6, o7, o9, o11 uint64

	// Field (0) 'RandaoReveal'
	if cap(b.RandaoReveal) == 0 {
		b.RandaoReveal = make([]byte, 0, len(buf[0:96]))
	}
	b.RandaoReveal = append(b.RandaoReveal, buf[0:96]...)

	// Field (1) 'Eth1Data'
	if b.Eth1Data == nil {
		b.Eth1Data = new(Eth1Data)
	}
	if err = b.Eth1Data.UnmarshalSSZ(buf[96:168]); err != nil {
		return err
	}

	// Field (2) 'Graffiti'
	if cap(b.Graffiti) == 0 {
		b.Graffiti = make([]byte, 0, len(buf[168:200]))
	}
	b.Graffiti = append(b.Graffiti, buf[168:200]...)

	// Offset (3) 'ProposerSlashings'
	if o3 = ssz.ReadOffset(buf[200:204]); o3 > size {
		return ssz.ErrOffset
	}

	if o3 != 664 {
		return ssz.ErrInvalidVariableOffset
	}

	// Offset (4) 'AttesterSlashings'
	if o4 = ssz.ReadOffset(buf[204:208]); o4 > size || o3 > o4 {
		return ssz.ErrOffset
	}

	// Offset (5) 'Attestations'
	if o5 = ssz.ReadOffset(buf[208:212]); o5 > size || o4 > o5 {
		return ssz.ErrOffset
	}

	// Offset (6) 'Deposits'
	if o6 = ssz.ReadOffset(buf[212:216]); o6 > size || o5 > o6 {
		return ssz.ErrOffset
	}

	// Offset (7) 'VoluntaryExits'
	if o7 = ssz.ReadOffset(buf[216:220]); o7 > size || o6 > o7 {
		return ssz.ErrOffset
	}

	// Field (8) 'SyncAggregate'
	if b.SyncAggregate == nil {
		b.SyncAggregate = new(SyncAggregate)
	}
	if err = b.SyncAggregate.UnmarshalSSZ(buf[220:380]); err != nil {
		return err
	}

	// Offset (9) 'BlsToExecutionChanges'
	if o9 = ssz.ReadOffset(buf[380:384]); o9 > size || o7 > o9 {
		return ssz.ErrOffset
	}

	// Field (10) 'SignedExecutionPayloadBid'
	if b.SignedExecutionPayloadBid == nil {
		b.SignedExecutionPayloadBid = new(SignedExecutionPayloadBid)
	}
	if err = b.SignedExecutionPayloadBid.UnmarshalSSZ(buf[384:660]); err != nil {
		return err
	}

	// Offset (11) 'PayloadAttestations'
	if o11 = ssz.ReadOffset(buf[660:664]); o11 > size || o9 > o11 {
		return ssz.ErrOffset
	}

	// Field (3) 'ProposerSlashings'
	{
		buf = tail[o3:o4]
		num, err := ssz.DivideInt2(len(buf), 416, 16)
		if err != nil {
			return err
		}
		b.ProposerSlashings = make([]*ProposerSlashing, num)
		for ii := 0; ii < num; ii++ {
			if b.ProposerSlashings[ii] == nil {
				b.ProposerSlashings[ii] = new(ProposerSlashing)
			}
			if err = b.ProposerSlashings[ii].UnmarshalSSZ(buf[ii*416 : (ii+1)*416]); err != nil {
				return err
			}
		}
	}

	// Field (4) 'AttesterSlashings'
	{
		buf = tail[o4:o5]
		num, err := ssz.DecodeDynamicLength(buf, 1)
		if err != nil {
			return err
		}
		b.AttesterSlashings = make([]*AttesterSlashingElectra, num)
		err = ssz.UnmarshalDynamic(buf, num, func(indx int, buf []byte) (err error) {
			if b.AttesterSlashings[indx] == nil {
				b.AttesterSlashings[indx] = new(AttesterSlashingElectra)
			}
			if err = b.AttesterSlashings[indx].UnmarshalSSZ(buf); err != nil {
				return err
			}
			return nil
		})
		if err != nil {
			return err
		}
	}

	// Field (5) 'Attestations'
	{
		buf = tail[o5:o6]
		num, err := ssz.DecodeDynamicLength(buf, 8)
		if err != nil {
			return err
		}
		b.Attestations = make([]*AttestationElectra, num)
		err = ssz.UnmarshalDynamic(buf, num, func(indx int, buf []byte) (err error) {
			if b.Attestations[indx] == nil {
				b.Attestations[indx] = new(AttestationElectra)
			}
			if err = b.Attestations[indx].UnmarshalSSZ(buf); err != nil {
				return err
			}
			return nil
		})
		if err != nil {
			return err
		}
	}

	// Field (6) 'Deposits'
	{
		buf = tail[o6:o7]
		num, err := ssz.DivideInt2(len(buf), 1240, 16)
		if err != nil {
			return err
		}
		b.Deposits = make([]*Deposit, num)
		for ii := 0; ii < num; ii++ {
			if b.Deposits[ii] == nil {
				b.Deposits[ii] = new(Deposit)
			}
			if err = b.Deposits[ii].UnmarshalSSZ(buf[ii*1240 : (ii+1)*1240]); err != nil {
				return err
			}
		}
	}

	// Field (7) 'VoluntaryExits'
	{
		buf = tail[o7:o9]
		num, err := ssz.DivideInt2(len(buf), 112, 16)
		if err != nil {
			return err
		}
		b.VoluntaryExits = make([]*SignedVoluntaryExit, num)
		for ii := 0; ii < num; ii++ {
			if b.VoluntaryExits[ii] == nil {
				b.VoluntaryExits[ii] = new(SignedVoluntaryExit)
			}
			if err = b.VoluntaryExits[ii].UnmarshalSSZ(buf[ii*112 : (ii+1)*112]); err != nil {
				return err
			}
		}
	}

	// Field (9) 'BlsToExecutionChanges'
	{
		buf = tail[o9:o11]
		num, err := ssz.DivideInt2(len(buf), 172, 16)
		if err != nil {
			return err
		}
		b.BlsToExecutionChanges = make([]*SignedBLSToExecutionChange, num)
		for ii := 0; ii < num; ii++ {
			if b.BlsToExecutionChanges[ii] == nil {
				b.BlsToExecutionChanges[ii] = new(SignedBLSToExecutionChange)
			}
			if err = b.BlsToExecutionChanges[ii].UnmarshalSSZ(buf[ii*172 : (ii+1)*172]); err != nil {
				return err
			}
		}
	}

	// Field (11) 'PayloadAttestations'
	{
		buf = tail[o11:]
		num, err := ssz.DivideInt2(len(buf), 202, 4)
		if err != nil {
			return err
		}
		b.PayloadAttestations = make([]*PayloadAttestation, num)
		for ii := 0; ii < num; ii++ {
			if b.PayloadAttestations[ii] == nil {
				b.PayloadAttestations[ii] = new(PayloadAttestation)
			}
			if err = b.PayloadAttestations[ii].UnmarshalSSZ(buf[ii*202 : (ii+1)*202]); err != nil {
				return err
			}
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the BeaconBlockBodyGloas object
func (b *BeaconBlockBodyGloas) SizeSSZ() (size int) {
	size = 664

	// Field (3) 'ProposerSlashings'
	size += len(b.ProposerSlashings) * 416

	// Field (4) 'AttesterSlashings'
	for ii := 0; ii < len(b.AttesterSlashings); ii++ {
		size += 4
		size += b.AttesterSlashings[ii].SizeSSZ()
	}

	// Field (5) 'Attestations'
	for ii := 0; ii < len(b.Attestations); ii++ {
		size += 4
		size += b.Attestations[ii].SizeSSZ()
	}

	// Field (6) 'Deposits'
	size += len(b.Deposits) * 1240

	// Field (7) 'VoluntaryExits'
	size += len(b.VoluntaryExits) * 112

	// Field (9) 'BlsToExecutionChanges'
	size += len(b.BlsToExecutionChanges) * 172

	// Field (11) 'PayloadAttestations'
	size += len(b.PayloadAttestations) * 202

	return
}

// HashTreeRoot ssz hashes the BeaconBlockBodyGloas object
func (b *BeaconBlockBodyGloas) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(b)
}

// HashTreeRootWith ssz hashes the BeaconBlockBodyGloas object with a hasher
func (b *BeaconBlockBodyGloas) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'RandaoReveal'
	if size := len(b.RandaoReveal); size != 96 {
		err = ssz.ErrBytesLengthFn("--.RandaoReveal", size, 96)
		return
	}
	hh.PutBytes(b.RandaoReveal)

	// Field (1) 'Eth1Data'
	if err = b.Eth1Data.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (2) 'Graffiti'
	if size := len(b.Graffiti); size != 32 {
		err = ssz.ErrBytesLengthFn("--.Graffiti", size, 32)
		return
	}
	hh.PutBytes(b.Graffiti)

	// Field (3) 'ProposerSlashings'
	{
		subIndx := hh.Index()
		num := uint64(len(b.ProposerSlashings))
		if num > 16 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.ProposerSlashings {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 16)
	}

	// Field (4) 'AttesterSlashings'
	{
		subIndx := hh.Index()
		num := uint64(len(b.AttesterSlashings))
		if num > 1 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.AttesterSlashings {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 1)
	}

	// Field (5) 'Attestations'
	{
		subIndx := hh.Index()
		num := uint64(len(b.Attestations))
		if num > 8 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.Attestations {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 8)
	}

	// Field (6) 'Deposits'
	{
		subIndx := hh.Index()
		num := uint64(len(b.Deposits))
		if num > 16 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.Deposits {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 16)
	}

	// Field (7) 'VoluntaryExits'
	{
		subIndx := hh.Index()
		num := uint64(len(b.VoluntaryExits))
		if num > 16 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.VoluntaryExits {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 16)
	}

	// Field (8) 'SyncAggregate'
	if err = b.SyncAggregate.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (9) 'BlsToExecutionChanges'
	{
		subIndx := hh.Index()
		num := uint64(len(b.BlsToExecutionChanges))
		if num > 16 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.BlsToExecutionChanges {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 16)
	}

	// Field (10) 'SignedExecutionPayloadBid'
	if err = b.SignedExecutionPayloadBid.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (11) 'PayloadAttestations'
	{
		subIndx := hh.Index()
		num := uint64(len(b.PayloadAttestations))
		if num > 4 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.PayloadAttestations {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 4)
	}

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the SignedBeaconBlockGloas object
func (s *SignedBeaconBlockGloas) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(s)
}

// MarshalSSZTo ssz marshals the SignedBeaconBlockGloas object to a target array
func (s *SignedBeaconBlockGloas) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(100)

	// Offset (0) 'Block'
	dst = ssz.WriteOffset(dst, offset)
	if s.Block == nil {
		s.Block = new(BeaconBlockGloas)
	}
	offset += s.Block.SizeSSZ()

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	dst = append(dst, s.Signature...)

	// Field (0) 'Block'
	if dst, err = s.Block.MarshalSSZTo(dst); err != nil {
		return
	}

	return
}

// UnmarshalSSZ ssz unmarshals the SignedBeaconBlockGloas object
func (s *SignedBeaconBlockGloas) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 100 {
		return ssz.ErrSize
	}

	tail := buf
	var o0 uint64

	// Offset (0) 'Block'
	if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
		return ssz.ErrOffset
	}

	if o0 != 100 {
		return ssz.ErrInvalidVariableOffset
	}

	// Field (1) 'Signature'
	if cap(s.Signature) == 0 {
		s.Signature = make([]byte, 0, len(buf[4:100]))
	}
	s.Signature = append(s.Signature, buf[4:100]...)

	// Field (0) 'Block'
	{
		buf = tail[o0:]
		if s.Block == nil {
			s.Block = new(BeaconBlockGloas)
		}
		if err = s.Block.UnmarshalSSZ(buf); err != nil {
			return err
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the SignedBeaconBlockGloas object
func (s *SignedBeaconBlockGloas) SizeSSZ() (size int) {
	size = 100

	// Field (0) 'Block'
	if s.Block == nil {
		s.Block = new(BeaconBlockGloas)
	}
	size += s.Block.SizeSSZ()

	return
}

// HashTreeRoot ssz hashes the SignedBeaconBlockGloas object
func (s *SignedBeaconBlockGloas) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(s)
}

// HashTreeRootWith ssz hashes the SignedBeaconBlockGloas object with a hasher
func (s *SignedBeaconBlockGloas) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Block'
	if err = s.Block.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	hh.PutBytes(s.Signature)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the BeaconStateGloas object
func (b *BeaconStateGloas) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(b)
}

// MarshalSSZTo ssz marshals the BeaconStateGloas object to a target array
func (b *BeaconStateGloas) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(2741821)

	// Field (0) 'GenesisTime'
	dst = ssz.MarshalUint64(dst, b.GenesisTime)

	// Field (1) 'GenesisValidatorsRoot'
	if size := len(b.GenesisValidatorsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.GenesisValidatorsRoot", size, 32)
		return
	}
	dst = append(dst, b.GenesisValidatorsRoot...)

	// Field (2) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(b.Slot))

	// Field (3) 'Fork'
	if b.Fork == nil {
		b.Fork = new(Fork)
	}
	if dst, err = b.Fork.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (4) 'LatestBlockHeader'
	if b.LatestBlockHeader == nil {
		b.LatestBlockHeader = new(BeaconBlockHeader)
	}
	if dst, err = b.LatestBlockHeader.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (5) 'BlockRoots'
	if size := len(b.BlockRoots); size != 8192 {
		err = ssz.ErrVectorLengthFn("--.BlockRoots", size, 8192)
		return
	}
	for ii := 0; ii < 8192; ii++ {
		if size := len(b.BlockRoots[ii]); size != 32 {
			err = ssz.ErrBytesLengthFn("--.BlockRoots[ii]", size, 32)
			return
		}
		dst = append(dst, b.BlockRoots[ii]...)
	}

	// Field (6) 'StateRoots'
	if size := len(b.StateRoots); size != 8192 {
		err = ssz.ErrVectorLengthFn("--.StateRoots", size, 8192)
		return
	}
	for ii := 0; ii < 8192; ii++ {
		if size := len(b.StateRoots[ii]); size != 32 {
			err = ssz.ErrBytesLengthFn("--.StateRoots[ii]", size, 32)
			return
		}
		dst = append(dst, b.StateRoots[ii]...)
	}

	// Offset (7) 'HistoricalRoots'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.HistoricalRoots) * 32

	// Field (8) 'Eth1Data'
	if b.Eth1Data == nil {
		b.Eth1Data = new(Eth1Data)
	}
	if dst, err = b.Eth1Data.MarshalSSZTo(dst); err != nil {
		return
	}

	// Offset (9) 'Eth1DataVotes'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.Eth1DataVotes) * 72

	// Field (10) 'Eth1DepositIndex'
	dst = ssz.MarshalUint64(dst, b.Eth1DepositIndex)

	// Offset (11) 'Validators'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.Validators) * 121

	// Offset (12) 'Balances'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.Balances) * 8

	// Field (13) 'RandaoMixes'
	if size := len(b.RandaoMixes); size != 65536 {
		err = ssz.ErrVectorLengthFn("--.RandaoMixes", size, 65536)
		return
	}
	for ii := 0; ii < 65536; ii++ {
		if size := len(b.RandaoMixes[ii]); size != 32 {
			err = ssz.ErrBytesLengthFn("--.RandaoMixes[ii]", size, 32)
			return
		}
		dst = append(dst, b.RandaoMixes[ii]...)
	}

	// Field (14) 'Slashings'
	if size := len(b.Slashings); size != 8192 {
		err = ssz.ErrVectorLengthFn("--.Slashings", size, 8192)
		return
	}
	for ii := 0; ii < 8192; ii++ {
		dst = ssz.MarshalUint64(dst, b.Slashings[ii])
	}

	// Offset (15) 'PreviousEpochParticipation'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.PreviousEpochParticipation)

	// Offset (16) 'CurrentEpochParticipation'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.CurrentEpochParticipation)

	// Field (17) 'JustificationBits'
	if size := len(b.JustificationBits); size != 1 {
		err = ssz.ErrBytesLengthFn("--.JustificationBits", size, 1)
		return
	}
	dst = append(dst, b.JustificationBits...)

	// Field (18) 'PreviousJustifiedCheckpoint'
	if b.PreviousJustifiedCheckpoint == nil {
		b.PreviousJustifiedCheckpoint = new(Checkpoint)
	}
	if dst, err = b.PreviousJustifiedCheckpoint.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (19) 'CurrentJustifiedCheckpoint'
	if b.CurrentJustifiedCheckpoint == nil {
		b.CurrentJustifiedCheckpoint = new(Checkpoint)
	}
	if dst, err = b.CurrentJustifiedCheckpoint.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (20) 'FinalizedCheckpoint'
	if b.FinalizedCheckpoint == nil {
		b.FinalizedCheckpoint = new(Checkpoint)
	}
	if dst, err = b.FinalizedCheckpoint.MarshalSSZTo(dst); err != nil {
		return
	}

	// Offset (21) 'InactivityScores'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.InactivityScores) * 8

	// Field (22) 'CurrentSyncCommittee'
	if b.CurrentSyncCommittee == nil {
		b.CurrentSyncCommittee = new(SyncCommittee)
	}
	if dst, err = b.CurrentSyncCommittee.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (23) 'NextSyncCommittee'
	if b.NextSyncCommittee == nil {
		b.NextSyncCommittee = new(SyncCommittee)
	}
	if dst, err = b.NextSyncCommittee.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (24) 'LatestExecutionPayloadBid'
	if b.LatestExecutionPayloadBid == nil {
		b.LatestExecutionPayloadBid = new(ExecutionPayloadBid)
	}
	if dst, err = b.LatestExecutionPayloadBid.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (25) 'NextWithdrawalIndex'
	dst = ssz.MarshalUint64(dst, b.NextWithdrawalIndex)

	// Field (26) 'NextWithdrawalValidatorIndex'
	dst = ssz.MarshalUint64(dst, uint64(b.NextWithdrawalValidatorIndex))

	// Offset (27) 'HistoricalSummaries'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.HistoricalSummaries) * 64

	// Field (28) 'DepositRequestsStartIndex'
	dst = ssz.MarshalUint64(dst, b.DepositRequestsStartIndex)

	// Field (29) 'DepositBalanceToConsume'
	dst = ssz.MarshalUint64(dst, uint64(b.DepositBalanceToConsume))

	// Field (30) 'ExitBalanceToConsume'
	dst = ssz.MarshalUint64(dst, uint64(b.ExitBalanceToConsume))

	// Field (31) 'EarliestExitEpoch'
	dst = ssz.MarshalUint64(dst, uint64(b.EarliestExitEpoch))

	// Field (32) 'ConsolidationBalanceToConsume'
	dst = ssz.MarshalUint64(dst, uint64(b.ConsolidationBalanceToConsume))

	// Field (33) 'EarliestConsolidationEpoch'
	dst = ssz.MarshalUint64(dst, uint64(b.EarliestConsolidationEpoch))

	// Offset (34) 'PendingDeposits'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.PendingDeposits) * 192

	// Offset (35) 'PendingPartialWithdrawals'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.PendingPartialWithdrawals) * 24

	// Offset (36) 'PendingConsolidations'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.PendingConsolidations) * 16

	// Field (37) 'ProposerLookahead'
	if size := len(b.ProposerLookahead); size != 64 {
		err = ssz.ErrVectorLengthFn("--.ProposerLookahead", size, 64)
		return
	}
	for ii := 0; ii < 64; ii++ {
		dst = ssz.MarshalUint64(dst, b.ProposerLookahead[ii])
	}

	// Field (38) 'ExecutionPayloadAvailability'
	if size := len(b.ExecutionPayloadAvailability); size != 1024 {
		err = ssz.ErrBytesLengthFn("--.ExecutionPayloadAvailability", size, 1024)
		return
	}
	dst = append(dst, b.ExecutionPayloadAvailability...)

	// Field (39) 'BuilderPendingPayments'
	if size := len(b.BuilderPendingPayments); size != 64 {
		err = ssz.ErrVectorLengthFn("--.BuilderPendingPayments", size, 64)
		return
	}
	for ii := 0; ii < 64; ii++ {
		if dst, err = b.BuilderPendingPayments[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Offset (40) 'BuilderPendingWithdrawals'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(b.BuilderPendingWithdrawals) * 44

	// Field (41) 'LatestBlockHash'
	if size := len(b.LatestBlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.LatestBlockHash", size, 32)
		return
	}
	dst = append(dst, b.LatestBlockHash...)

	// Field (42) 'LatestWithdrawalsRoot'
	if size := len(b.LatestWithdrawalsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.LatestWithdrawalsRoot", size, 32)
		return
	}
	dst = append(dst, b.LatestWithdrawalsRoot...)

	// Field (7) 'HistoricalRoots'
	if size := len(b.HistoricalRoots); size > 16777216 {
		err = ssz.ErrListTooBigFn("--.HistoricalRoots", size, 16777216)
		return
	}
	for ii := 0; ii < len(b.HistoricalRoots); ii++ {
		if size := len(b.HistoricalRoots[ii]); size != 32 {
			err = ssz.ErrBytesLengthFn("--.HistoricalRoots[ii]", size, 32)
			return
		}
		dst = append(dst, b.HistoricalRoots[ii]...)
	}

	// Field (9) 'Eth1DataVotes'
	if size := len(b.Eth1DataVotes); size > 2048 {
		err = ssz.ErrListTooBigFn("--.Eth1DataVotes", size, 2048)
		return
	}
	for ii := 0; ii < len(b.Eth1DataVotes); ii++ {
		if dst, err = b.Eth1DataVotes[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (11) 'Validators'
	if size := len(b.Validators); size > 1099511627776 {
		err = ssz.ErrListTooBigFn("--.Validators", size, 1099511627776)
		return
	}
	for ii := 0; ii < len(b.Validators); ii++ {
		if dst, err = b.Validators[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (12) 'Balances'
	if size := len(b.Balances); size > 1099511627776 {
		err = ssz.ErrListTooBigFn("--.Balances", size, 1099511627776)
		return
	}
	for ii := 0; ii < len(b.Balances); ii++ {
		dst = ssz.MarshalUint64(dst, b.Balances[ii])
	}

	// Field (15) 'PreviousEpochParticipation'
	if size := len(b.PreviousEpochParticipation); size > 1099511627776 {
		err = ssz.ErrBytesLengthFn("--.PreviousEpochParticipation", size, 1099511627776)
		return
	}
	dst = append(dst, b.PreviousEpochParticipation...)

	// Field (16) 'CurrentEpochParticipation'
	if size := len(b.CurrentEpochParticipation); size > 1099511627776 {
		err = ssz.ErrBytesLengthFn("--.CurrentEpochParticipation", size, 1099511627776)
		return
	}
	dst = append(dst, b.CurrentEpochParticipation...)

	// Field (21) 'InactivityScores'
	if size := len(b.InactivityScores); size > 1099511627776 {
		err = ssz.ErrListTooBigFn("--.InactivityScores", size, 1099511627776)
		return
	}
	for ii := 0; ii < len(b.InactivityScores); ii++ {
		dst = ssz.MarshalUint64(dst, b.InactivityScores[ii])
	}

	// Field (27) 'HistoricalSummaries'
	if size := len(b.HistoricalSummaries); size > 16777216 {
		err = ssz.ErrListTooBigFn("--.HistoricalSummaries", size, 16777216)
		return
	}
	for ii := 0; ii < len(b.HistoricalSummaries); ii++ {
		if dst, err = b.HistoricalSummaries[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (34) 'PendingDeposits'
	if size := len(b.PendingDeposits); size > 134217728 {
		err = ssz.ErrListTooBigFn("--.PendingDeposits", size, 134217728)
		return
	}
	for ii := 0; ii < len(b.PendingDeposits); ii++ {
		if dst, err = b.PendingDeposits[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (35) 'PendingPartialWithdrawals'
	if size := len(b.PendingPartialWithdrawals); size > 134217728 {
		err = ssz.ErrListTooBigFn("--.PendingPartialWithdrawals", size, 134217728)
		return
	}
	for ii := 0; ii < len(b.PendingPartialWithdrawals); ii++ {
		if dst, err = b.PendingPartialWithdrawals[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (36) 'PendingConsolidations'
	if size := len(b.PendingConsolidations); size > 262144 {
		err = ssz.ErrListTooBigFn("--.PendingConsolidations", size, 262144)
		return
	}
	for ii := 0; ii < len(b.PendingConsolidations); ii++ {
		if dst, err = b.PendingConsolidations[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	// Field (40) 'BuilderPendingWithdrawals'
	if size := len(b.BuilderPendingWithdrawals); size > 1048576 {
		err = ssz.ErrListTooBigFn("--.BuilderPendingWithdrawals", size, 1048576)
		return
	}
	for ii := 0; ii < len(b.BuilderPendingWithdrawals); ii++ {
		if dst, err = b.BuilderPendingWithdrawals[ii].MarshalSSZTo(dst); err != nil {
			return
		}
	}

	return
}

// UnmarshalSSZ ssz unmarshals the BeaconStateGloas object
func (b *BeaconStateGloas) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 2741821 {
		return ssz.ErrSize
	}

	tail := buf
	var o7, o9, o11, o12, o15, o16, o21, o27, o34, o35, o36, o40 uint64

	// Field (0) 'GenesisTime'
	b.GenesisTime = ssz.UnmarshallUint64(buf[0:8])

	// Field (1) 'GenesisValidatorsRoot'
	if cap(b.GenesisValidatorsRoot) == 0 {
		b.GenesisValidatorsRoot = make([]byte, 0, len(buf[8:40]))
	}
	b.GenesisValidatorsRoot = append(b.GenesisValidatorsRoot, buf[8:40]...)

	// Field (2) 'Slot'
	b.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[40:48]))

	// Field (3) 'Fork'
	if b.Fork == nil {
		b.Fork = new(Fork)
	}
	if err = b.Fork.UnmarshalSSZ(buf[48:64]); err != nil {
		return err
	}

	// Field (4) 'LatestBlockHeader'
	if b.LatestBlockHeader == nil {
		b.LatestBlockHeader = new(BeaconBlockHeader)
	}
	if err = b.LatestBlockHeader.UnmarshalSSZ(buf[64:176]); err != nil {
		return err
	}

	// Field (5) 'BlockRoots'
	b.BlockRoots = make([][]byte, 8192)
	for ii := 0; ii < 8192; ii++ {
		if cap(b.BlockRoots[ii]) == 0 {
			b.BlockRoots[ii] = make([]byte, 0, len(buf[176:262320][ii*32:(ii+1)*32]))
		}
		b.BlockRoots[ii] = append(b.BlockRoots[ii], buf[176:262320][ii*32:(ii+1)*32]...)
	}

	// Field (6) 'StateRoots'
	b.StateRoots = make([][]byte, 8192)
	for ii := 0; ii < 8192; ii++ {
		if cap(b.StateRoots[ii]) == 0 {
			b.StateRoots[ii] = make([]byte, 0, len(buf[262320:524464][ii*32:(ii+1)*32]))
		}
		b.StateRoots[ii] = append(b.StateRoots[ii], buf[262320:524464][ii*32:(ii+1)*32]...)
	}

	// Offset (7) 'HistoricalRoots'
	if o7 = ssz.ReadOffset(buf[524464:524468]); o7 > size {
		return ssz.ErrOffset
	}

	if o7 != 2741821 {
		return ssz.ErrInvalidVariableOffset
	}

	// Field (8) 'Eth1Data'
	if b.Eth1Data == nil {
		b.Eth1Data = new(Eth1Data)
	}
	if err = b.Eth1Data.UnmarshalSSZ(buf[524468:524540]); err != nil {
		return err
	}

	// Offset (9) 'Eth1DataVotes'
	if o9 = ssz.ReadOffset(buf[524540:524544]); o9 > size || o7 > o9 {
		return ssz.ErrOffset
	}

	// Field (10) 'Eth1DepositIndex'
	b.Eth1DepositIndex = ssz.UnmarshallUint64(buf[524544:524552])

	// Offset (11) 'Validators'
	if o11 = ssz.ReadOffset(buf[524552:524556]); o11 > size || o9 > o11 {
		return ssz.ErrOffset
	}

	// Offset (12) 'Balances'
	if o12 = ssz.ReadOffset(buf[524556:524560]); o12 > size || o11 > o12 {
		return ssz.ErrOffset
	}

	// Field (13) 'RandaoMixes'
	b.RandaoMixes = make([][]byte, 65536)
	for ii := 0; ii < 65536; ii++ {
		if cap(b.RandaoMixes[ii]) == 0 {
			b.RandaoMixes[ii] = make([]byte, 0, len(buf[524560:2621712][ii*32:(ii+1)*32]))
		}
		b.RandaoMixes[ii] = append(b.RandaoMixes[ii], buf[524560:2621712][ii*32:(ii+1)*32]...)
	}

	// Field (14) 'Slashings'
	b.Slashings = ssz.ExtendUint64(b.Slashings, 8192)
	for ii := 0; ii < 8192; ii++ {
		b.Slashings[ii] = ssz.UnmarshallUint64(buf[2621712:2687248][ii*8 : (ii+1)*8])
	}

	// Offset (15) 'PreviousEpochParticipation'
	if o15 = ssz.ReadOffset(buf[2687248:2687252]); o15 > size || o12 > o15 {
		return ssz.ErrOffset
	}

	// Offset (16) 'CurrentEpochParticipation'
	if o16 = ssz.ReadOffset(buf[2687252:2687256]); o16 > size || o15 > o16 {
		return ssz.ErrOffset
	}

	// Field (17) 'JustificationBits'
	if cap(b.JustificationBits) == 0 {
		b.JustificationBits = make([]byte, 0, len(buf[2687256:2687257]))
	}
	b.JustificationBits = append(b.JustificationBits, buf[2687256:2687257]...)

	// Field (18) 'PreviousJustifiedCheckpoint'
	if b.PreviousJustifiedCheckpoint == nil {
		b.PreviousJustifiedCheckpoint = new(Checkpoint)
	}
	if err = b.PreviousJustifiedCheckpoint.UnmarshalSSZ(buf[2687257:2687297]); err != nil {
		return err
	}

	// Field (19) 'CurrentJustifiedCheckpoint'
	if b.CurrentJustifiedCheckpoint == nil {
		b.CurrentJustifiedCheckpoint = new(Checkpoint)
	}
	if err = b.CurrentJustifiedCheckpoint.UnmarshalSSZ(buf[2687297:2687337]); err != nil {
		return err
	}

	// Field (20) 'FinalizedCheckpoint'
	if b.FinalizedCheckpoint == nil {
		b.FinalizedCheckpoint = new(Checkpoint)
	}
	if err = b.FinalizedCheckpoint.UnmarshalSSZ(buf[2687337:2687377]); err != nil {
		return err
	}

	// Offset (21) 'InactivityScores'
	if o21 = ssz.ReadOffset(buf[2687377:2687381]); o21 > size || o16 > o21 {
		return ssz.ErrOffset
	}

	// Field (22) 'CurrentSyncCommittee'
	if b.CurrentSyncCommittee == nil {
		b.CurrentSyncCommittee = new(SyncCommittee)
	}
	if err = b.CurrentSyncCommittee.UnmarshalSSZ(buf[2687381:2712005]); err != nil {
		return err
	}

	// Field (23) 'NextSyncCommittee'
	if b.NextSyncCommittee == nil {
		b.NextSyncCommittee = new(SyncCommittee)
	}
	if err = b.NextSyncCommittee.UnmarshalSSZ(buf[2712005:2736629]); err != nil {
		return err
	}

	// Field (24) 'LatestExecutionPayloadBid'
	if b.LatestExecutionPayloadBid == nil {
		b.LatestExecutionPayloadBid = new(ExecutionPayloadBid)
	}
	if err = b.LatestExecutionPayloadBid.UnmarshalSSZ(buf[2736629:2736809]); err != nil {
		return err
	}

	// Field (25) 'NextWithdrawalIndex'
	b.NextWithdrawalIndex = ssz.UnmarshallUint64(buf[2736809:2736817])

	// Field (26) 'NextWithdrawalValidatorIndex'
	b.NextWithdrawalValidatorIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[2736817:2736825]))

	// Offset (27) 'HistoricalSummaries'
	if o27 = ssz.ReadOffset(buf[2736825:2736829]); o27 > size || o21 > o27 {
		return ssz.ErrOffset
	}

	// Field (28) 'DepositRequestsStartIndex'
	b.DepositRequestsStartIndex = ssz.UnmarshallUint64(buf[2736829:2736837])

	// Field (29) 'DepositBalanceToConsume'
	b.DepositBalanceToConsume = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736837:2736845]))

	// Field (30) 'ExitBalanceToConsume'
	b.ExitBalanceToConsume = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736845:2736853]))

	// Field (31) 'EarliestExitEpoch'
	b.EarliestExitEpoch = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Epoch(ssz.UnmarshallUint64(buf[2736853:2736861]))

	// Field (32) 'ConsolidationBalanceToConsume'
	b.ConsolidationBalanceToConsume = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[2736861:2736869]))

	// Field (33) 'EarliestConsolidationEpoch'
	b.EarliestConsolidationEpoch = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Epoch(ssz.UnmarshallUint64(buf[2736869:2736877]))

	// Offset (34) 'PendingDeposits'
	if o34 = ssz.ReadOffset(buf[2736877:2736881]); o34 > size || o27 > o34 {
		return ssz.ErrOffset
	}

	// Offset (35) 'PendingPartialWithdrawals'
	if o35 = ssz.ReadOffset(buf[2736881:2736885]); o35 > size || o34 > o35 {
		return ssz.ErrOffset
	}

	// Offset (36) 'PendingConsolidations'
	if o36 = ssz.ReadOffset(buf[2736885:2736889]); o36 > size || o35 > o36 {
		return ssz.ErrOffset
	}

	// Field (37) 'ProposerLookahead'
	b.ProposerLookahead = ssz.ExtendUint64(b.ProposerLookahead, 64)
	for ii := 0; ii < 64; ii++ {
		b.ProposerLookahead[ii] = ssz.UnmarshallUint64(buf[2736889:2737401][ii*8 : (ii+1)*8])
	}

	// Field (38) 'ExecutionPayloadAvailability'
	if cap(b.ExecutionPayloadAvailability) == 0 {
		b.ExecutionPayloadAvailability = make([]byte, 0, len(buf[2737401:2738425]))
	}
	b.ExecutionPayloadAvailability = append(b.ExecutionPayloadAvailability, buf[2737401:2738425]...)

	// Field (39) 'BuilderPendingPayments'
	b.BuilderPendingPayments = make([]*BuilderPendingPayment, 64)
	for ii := 0; ii < 64; ii++ {
		if b.BuilderPendingPayments[ii] == nil {
			b.BuilderPendingPayments[ii] = new(BuilderPendingPayment)
		}
		if err = b.BuilderPendingPayments[ii].UnmarshalSSZ(buf[2738425:2741753][ii*52 : (ii+1)*52]); err != nil {
			return err
		}
	}

	// Offset (40) 'BuilderPendingWithdrawals'
	if o40 = ssz.ReadOffset(buf[2741753:2741757]); o40 > size || o36 > o40 {
		return ssz.ErrOffset
	}

	// Field (41) 'LatestBlockHash'
	if cap(b.LatestBlockHash) == 0 {
		b.LatestBlockHash = make([]byte, 0, len(buf[2741757:2741789]))
	}
	b.LatestBlockHash = append(b.LatestBlockHash, buf[2741757:2741789]...)

	// Field (42) 'LatestWithdrawalsRoot'
	if cap(b.LatestWithdrawalsRoot) == 0 {
		b.LatestWithdrawalsRoot = make([]byte, 0, len(buf[2741789:2741821]))
	}
	b.LatestWithdrawalsRoot = append(b.LatestWithdrawalsRoot, buf[2741789:2741821]...)

	// Field (7) 'HistoricalRoots'
	{
		buf = tail[o7:o9]
		num, err := ssz.DivideInt2(len(buf), 32, 16777216)
		if err != nil {
			return err
		}
		b.HistoricalRoots = make([][]byte, num)
		for ii := 0; ii < num; ii++ {
			if cap(b.HistoricalRoots[ii]) == 0 {
				b.HistoricalRoots[ii] = make([]byte, 0, len(buf[ii*32:(ii+1)*32]))
			}
			b.HistoricalRoots[ii] = append(b.HistoricalRoots[ii], buf[ii*32:(ii+1)*32]...)
		}
	}

	// Field (9) 'Eth1DataVotes'
	{
		buf = tail[o9:o11]
		num, err := ssz.DivideInt2(len(buf), 72, 2048)
		if err != nil {
			return err
		}
		b.Eth1DataVotes = make([]*Eth1Data, num)
		for ii := 0; ii < num; ii++ {
			if b.Eth1DataVotes[ii] == nil {
				b.Eth1DataVotes[ii] = new(Eth1Data)
			}
			if err = b.Eth1DataVotes[ii].UnmarshalSSZ(buf[ii*72 : (ii+1)*72]); err != nil {
				return err
			}
		}
	}

	// Field (11) 'Validators'
	{
		buf = tail[o11:o12]
		num, err := ssz.DivideInt2(len(buf), 121, 1099511627776)
		if err != nil {
			return err
		}
		b.Validators = make([]*Validator, num)
		for ii := 0; ii < num; ii++ {
			if b.Validators[ii] == nil {
				b.Validators[ii] = new(Validator)
			}
			if err = b.Validators[ii].UnmarshalSSZ(buf[ii*121 : (ii+1)*121]); err != nil {
				return err
			}
		}
	}

	// Field (12) 'Balances'
	{
		buf = tail[o12:o15]
		num, err := ssz.DivideInt2(len(buf), 8, 1099511627776)
		if err != nil {
			return err
		}
		b.Balances = ssz.ExtendUint64(b.Balances, num)
		for ii := 0; ii < num; ii++ {
			b.Balances[ii] = ssz.UnmarshallUint64(buf[ii*8 : (ii+1)*8])
		}
	}

	// Field (15) 'PreviousEpochParticipation'
	{
		buf = tail[o15:o16]
		if len(buf) > 1099511627776 {
			return ssz.ErrBytesLength
		}
		if cap(b.PreviousEpochParticipation) == 0 {
			b.PreviousEpochParticipation = make([]byte, 0, len(buf))
		}
		b.PreviousEpochParticipation = append(b.PreviousEpochParticipation, buf...)
	}

	// Field (16) 'CurrentEpochParticipation'
	{
		buf = tail[o16:o21]
		if len(buf) > 1099511627776 {
			return ssz.ErrBytesLength
		}
		if cap(b.CurrentEpochParticipation) == 0 {
			b.CurrentEpochParticipation = make([]byte, 0, len(buf))
		}
		b.CurrentEpochParticipation = append(b.CurrentEpochParticipation, buf...)
	}

	// Field (21) 'InactivityScores'
	{
		buf = tail[o21:o27]
		num, err := ssz.DivideInt2(len(buf), 8, 1099511627776)
		if err != nil {
			return err
		}
		b.InactivityScores = ssz.ExtendUint64(b.InactivityScores, num)
		for ii := 0; ii < num; ii++ {
			b.InactivityScores[ii] = ssz.UnmarshallUint64(buf[ii*8 : (ii+1)*8])
		}
	}

	// Field (27) 'HistoricalSummaries'
	{
		buf = tail[o27:o34]
		num, err := ssz.DivideInt2(len(buf), 64, 16777216)
		if err != nil {
			return err
		}
		b.HistoricalSummaries = make([]*HistoricalSummary, num)
		for ii := 0; ii < num; ii++ {
			if b.HistoricalSummaries[ii] == nil {
				b.HistoricalSummaries[ii] = new(HistoricalSummary)
			}
			if err = b.HistoricalSummaries[ii].UnmarshalSSZ(buf[ii*64 : (ii+1)*64]); err != nil {
				return err
			}
		}
	}

	// Field (34) 'PendingDeposits'
	{
		buf = tail[o34:o35]
		num, err := ssz.DivideInt2(len(buf), 192, 134217728)
		if err != nil {
			return err
		}
		b.PendingDeposits = make([]*PendingDeposit, num)
		for ii := 0; ii < num; ii++ {
			if b.PendingDeposits[ii] == nil {
				b.PendingDeposits[ii] = new(PendingDeposit)
			}
			if err = b.PendingDeposits[ii].UnmarshalSSZ(buf[ii*192 : (ii+1)*192]); err != nil {
				return err
			}
		}
	}

	// Field (35) 'PendingPartialWithdrawals'
	{
		buf = tail[o35:o36]
		num, err := ssz.DivideInt2(len(buf), 24, 134217728)
		if err != nil {
			return err
		}
		b.PendingPartialWithdrawals = make([]*PendingPartialWithdrawal, num)
		for ii := 0; ii < num; ii++ {
			if b.PendingPartialWithdrawals[ii] == nil {
				b.PendingPartialWithdrawals[ii] = new(PendingPartialWithdrawal)
			}
			if err = b.PendingPartialWithdrawals[ii].UnmarshalSSZ(buf[ii*24 : (ii+1)*24]); err != nil {
				return err
			}
		}
	}

	// Field (36) 'PendingConsolidations'
	{
		buf = tail[o36:o40]
		num, err := ssz.DivideInt2(len(buf), 16, 262144)
		if err != nil {
			return err
		}
		b.PendingConsolidations = make([]*PendingConsolidation, num)
		for ii := 0; ii < num; ii++ {
			if b.PendingConsolidations[ii] == nil {
				b.PendingConsolidations[ii] = new(PendingConsolidation)
			}
			if err = b.PendingConsolidations[ii].UnmarshalSSZ(buf[ii*16 : (ii+1)*16]); err != nil {
				return err
			}
		}
	}

	// Field (40) 'BuilderPendingWithdrawals'
	{
		buf = tail[o40:]
		num, err := ssz.DivideInt2(len(buf), 44, 1048576)
		if err != nil {
			return err
		}
		b.BuilderPendingWithdrawals = make([]*BuilderPendingWithdrawal, num)
		for ii := 0; ii < num; ii++ {
			if b.BuilderPendingWithdrawals[ii] == nil {
				b.BuilderPendingWithdrawals[ii] = new(BuilderPendingWithdrawal)
			}
			if err = b.BuilderPendingWithdrawals[ii].UnmarshalSSZ(buf[ii*44 : (ii+1)*44]); err != nil {
				return err
			}
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the BeaconStateGloas object
func (b *BeaconStateGloas) SizeSSZ() (size int) {
	size = 2741821

	// Field (7) 'HistoricalRoots'
	size += len(b.HistoricalRoots) * 32

	// Field (9) 'Eth1DataVotes'
	size += len(b.Eth1DataVotes) * 72

	// Field (11) 'Validators'
	size += len(b.Validators) * 121

	// Field (12) 'Balances'
	size += len(b.Balances) * 8

	// Field (15) 'PreviousEpochParticipation'
	size += len(b.PreviousEpochParticipation)

	// Field (16) 'CurrentEpochParticipation'
	size += len(b.CurrentEpochParticipation)

	// Field (21) 'InactivityScores'
	size += len(b.InactivityScores) * 8

	// Field (27) 'HistoricalSummaries'
	size += len(b.HistoricalSummaries) * 64

	// Field (34) 'PendingDeposits'
	size += len(b.PendingDeposits) * 192

	// Field (35) 'PendingPartialWithdrawals'
	size += len(b.PendingPartialWithdrawals) * 24

	// Field (36) 'PendingConsolidations'
	size += len(b.PendingConsolidations) * 16

	// Field (40) 'BuilderPendingWithdrawals'
	size += len(b.BuilderPendingWithdrawals) * 44

	return
}

// HashTreeRoot ssz hashes the BeaconStateGloas object
func (b *BeaconStateGloas) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(b)
}

// HashTreeRootWith ssz hashes the BeaconStateGloas object with a hasher
func (b *BeaconStateGloas) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'GenesisTime'
	hh.PutUint64(b.GenesisTime)

	// Field (1) 'GenesisValidatorsRoot'
	if size := len(b.GenesisValidatorsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.GenesisValidatorsRoot", size, 32)
		return
	}
	hh.PutBytes(b.GenesisValidatorsRoot)

	// Field (2) 'Slot'
	hh.PutUint64(uint64(b.Slot))

	// Field (3) 'Fork'
	if err = b.Fork.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (4) 'LatestBlockHeader'
	if err = b.LatestBlockHeader.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (5) 'BlockRoots'
	{
		if size := len(b.BlockRoots); size != 8192 {
			err = ssz.ErrVectorLengthFn("--.BlockRoots", size, 8192)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.BlockRoots {
			if len(i) != 32 {
				err = ssz.ErrBytesLength
				return
			}
			hh.Append(i)
		}
		hh.Merkleize(subIndx)
	}

	// Field (6) 'StateRoots'
	{
		if size := len(b.StateRoots); size != 8192 {
			err = ssz.ErrVectorLengthFn("--.StateRoots", size, 8192)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.StateRoots {
			if len(i) != 32 {
				err = ssz.ErrBytesLength
				return
			}
			hh.Append(i)
		}
		hh.Merkleize(subIndx)
	}

	// Field (7) 'HistoricalRoots'
	{
		if size := len(b.HistoricalRoots); size > 16777216 {
			err = ssz.ErrListTooBigFn("--.HistoricalRoots", size, 16777216)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.HistoricalRoots {
			if len(i) != 32 {
				err = ssz.ErrBytesLength
				return
			}
			hh.Append(i)
		}

		numItems := uint64(len(b.HistoricalRoots))
		hh.MerkleizeWithMixin(subIndx, numItems, 16777216)
	}

	// Field (8) 'Eth1Data'
	if err = b.Eth1Data.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (9) 'Eth1DataVotes'
	{
		subIndx := hh.Index()
		num := uint64(len(b.Eth1DataVotes))
		if num > 2048 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.Eth1DataVotes {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 2048)
	}

	// Field (10) 'Eth1DepositIndex'
	hh.PutUint64(b.Eth1DepositIndex)

	// Field (11) 'Validators'
	{
		subIndx := hh.Index()
		num := uint64(len(b.Validators))
		if num > 1099511627776 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.Validators {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 1099511627776)
	}

	// Field (12) 'Balances'
	{
		if size := len(b.Balances); size > 1099511627776 {
			err = ssz.ErrListTooBigFn("--.Balances", size, 1099511627776)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.Balances {
			hh.AppendUint64(i)
		}
		hh.FillUpTo32()

		numItems := uint64(len(b.Balances))
		hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(1099511627776, numItems, 8))
	}

	// Field (13) 'RandaoMixes'
	{
		if size := len(b.RandaoMixes); size != 65536 {
			err = ssz.ErrVectorLengthFn("--.RandaoMixes", size, 65536)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.RandaoMixes {
			if len(i) != 32 {
				err = ssz.ErrBytesLength
				return
			}
			hh.Append(i)
		}
		hh.Merkleize(subIndx)
	}

	// Field (14) 'Slashings'
	{
		if size := len(b.Slashings); size != 8192 {
			err = ssz.ErrVectorLengthFn("--.Slashings", size, 8192)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.Slashings {
			hh.AppendUint64(i)
		}
		hh.Merkleize(subIndx)
	}

	// Field (15) 'PreviousEpochParticipation'
	{
		elemIndx := hh.Index()
		byteLen := uint64(len(b.PreviousEpochParticipation))
		if byteLen > 1099511627776 {
			err = ssz.ErrIncorrectListSize
			return
		}
		hh.PutBytes(b.PreviousEpochParticipation)
		hh.MerkleizeWithMixin(elemIndx, byteLen, (1099511627776+31)/32)
	}

	// Field (16) 'CurrentEpochParticipation'
	{
		elemIndx := hh.Index()
		byteLen := uint64(len(b.CurrentEpochParticipation))
		if byteLen > 1099511627776 {
			err = ssz.ErrIncorrectListSize
			return
		}
		hh.PutBytes(b.CurrentEpochParticipation)
		hh.MerkleizeWithMixin(elemIndx, byteLen, (1099511627776+31)/32)
	}

	// Field (17) 'JustificationBits'
	if size := len(b.JustificationBits); size != 1 {
		err = ssz.ErrBytesLengthFn("--.JustificationBits", size, 1)
		return
	}
	hh.PutBytes(b.JustificationBits)

	// Field (18) 'PreviousJustifiedCheckpoint'
	if err = b.PreviousJustifiedCheckpoint.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (19) 'CurrentJustifiedCheckpoint'
	if err = b.CurrentJustifiedCheckpoint.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (20) 'FinalizedCheckpoint'
	if err = b.FinalizedCheckpoint.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (21) 'InactivityScores'
	{
		if size := len(b.InactivityScores); size > 1099511627776 {
			err = ssz.ErrListTooBigFn("--.InactivityScores", size, 1099511627776)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.InactivityScores {
			hh.AppendUint64(i)
		}
		hh.FillUpTo32()

		numItems := uint64(len(b.InactivityScores))
		hh.MerkleizeWithMixin(subIndx, numItems, ssz.CalculateLimit(1099511627776, numItems, 8))
	}

	// Field (22) 'CurrentSyncCommittee'
	if err = b.CurrentSyncCommittee.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (23) 'NextSyncCommittee'
	if err = b.NextSyncCommittee.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (24) 'LatestExecutionPayloadBid'
	if err = b.LatestExecutionPayloadBid.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (25) 'NextWithdrawalIndex'
	hh.PutUint64(b.NextWithdrawalIndex)

	// Field (26) 'NextWithdrawalValidatorIndex'
	hh.PutUint64(uint64(b.NextWithdrawalValidatorIndex))

	// Field (27) 'HistoricalSummaries'
	{
		subIndx := hh.Index()
		num := uint64(len(b.HistoricalSummaries))
		if num > 16777216 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.HistoricalSummaries {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 16777216)
	}

	// Field (28) 'DepositRequestsStartIndex'
	hh.PutUint64(b.DepositRequestsStartIndex)

	// Field (29) 'DepositBalanceToConsume'
	hh.PutUint64(uint64(b.DepositBalanceToConsume))

	// Field (30) 'ExitBalanceToConsume'
	hh.PutUint64(uint64(b.ExitBalanceToConsume))

	// Field (31) 'EarliestExitEpoch'
	hh.PutUint64(uint64(b.EarliestExitEpoch))

	// Field (32) 'ConsolidationBalanceToConsume'
	hh.PutUint64(uint64(b.ConsolidationBalanceToConsume))

	// Field (33) 'EarliestConsolidationEpoch'
	hh.PutUint64(uint64(b.EarliestConsolidationEpoch))

	// Field (34) 'PendingDeposits'
	{
		subIndx := hh.Index()
		num := uint64(len(b.PendingDeposits))
		if num > 134217728 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.PendingDeposits {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 134217728)
	}

	// Field (35) 'PendingPartialWithdrawals'
	{
		subIndx := hh.Index()
		num := uint64(len(b.PendingPartialWithdrawals))
		if num > 134217728 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.PendingPartialWithdrawals {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 134217728)
	}

	// Field (36) 'PendingConsolidations'
	{
		subIndx := hh.Index()
		num := uint64(len(b.PendingConsolidations))
		if num > 262144 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.PendingConsolidations {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 262144)
	}

	// Field (37) 'ProposerLookahead'
	{
		if size := len(b.ProposerLookahead); size != 64 {
			err = ssz.ErrVectorLengthFn("--.ProposerLookahead", size, 64)
			return
		}
		subIndx := hh.Index()
		for _, i := range b.ProposerLookahead {
			hh.AppendUint64(i)
		}
		hh.Merkleize(subIndx)
	}

	// Field (38) 'ExecutionPayloadAvailability'
	if size := len(b.ExecutionPayloadAvailability); size != 1024 {
		err = ssz.ErrBytesLengthFn("--.ExecutionPayloadAvailability", size, 1024)
		return
	}
	hh.PutBytes(b.ExecutionPayloadAvailability)

	// Field (39) 'BuilderPendingPayments'
	{
		subIndx := hh.Index()
		for _, elem := range b.BuilderPendingPayments {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.Merkleize(subIndx)
	}

	// Field (40) 'BuilderPendingWithdrawals'
	{
		subIndx := hh.Index()
		num := uint64(len(b.BuilderPendingWithdrawals))
		if num > 1048576 {
			err = ssz.ErrIncorrectListSize
			return
		}
		for _, elem := range b.BuilderPendingWithdrawals {
			if err = elem.HashTreeRootWith(hh); err != nil {
				return
			}
		}
		hh.MerkleizeWithMixin(subIndx, num, 1048576)
	}

	// Field (41) 'LatestBlockHash'
	if size := len(b.LatestBlockHash); size != 32 {
		err = ssz.ErrBytesLengthFn("--.LatestBlockHash", size, 32)
		return
	}
	hh.PutBytes(b.LatestBlockHash)

	// Field (42) 'LatestWithdrawalsRoot'
	if size := len(b.LatestWithdrawalsRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.LatestWithdrawalsRoot", size, 32)
		return
	}
	hh.PutBytes(b.LatestWithdrawalsRoot)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the BuilderPendingPayment object
func (b *BuilderPendingPayment) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(b)
}

// MarshalSSZTo ssz marshals the BuilderPendingPayment object to a target array
func (b *BuilderPendingPayment) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'Weight'
	dst = ssz.MarshalUint64(dst, uint64(b.Weight))

	// Field (1) 'Withdrawal'
	if b.Withdrawal == nil {
		b.Withdrawal = new(BuilderPendingWithdrawal)
	}
	if dst, err = b.Withdrawal.MarshalSSZTo(dst); err != nil {
		return
	}

	return
}

// UnmarshalSSZ ssz unmarshals the BuilderPendingPayment object
func (b *BuilderPendingPayment) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 52 {
		return ssz.ErrSize
	}

	// Field (0) 'Weight'
	b.Weight = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[0:8]))

	// Field (1) 'Withdrawal'
	if b.Withdrawal == nil {
		b.Withdrawal = new(BuilderPendingWithdrawal)
	}
	if err = b.Withdrawal.UnmarshalSSZ(buf[8:52]); err != nil {
		return err
	}

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the BuilderPendingPayment object
func (b *BuilderPendingPayment) SizeSSZ() (size int) {
	size = 52
	return
}

// HashTreeRoot ssz hashes the BuilderPendingPayment object
func (b *BuilderPendingPayment) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(b)
}

// HashTreeRootWith ssz hashes the BuilderPendingPayment object with a hasher
func (b *BuilderPendingPayment) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Weight'
	hh.PutUint64(uint64(b.Weight))

	// Field (1) 'Withdrawal'
	if err = b.Withdrawal.HashTreeRootWith(hh); err != nil {
		return
	}

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the BuilderPendingWithdrawal object
func (b *BuilderPendingWithdrawal) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(b)
}

// MarshalSSZTo ssz marshals the BuilderPendingWithdrawal object to a target array
func (b *BuilderPendingWithdrawal) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf

	// Field (0) 'FeeRecipient'
	if size := len(b.FeeRecipient); size != 20 {
		err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
		return
	}
	dst = append(dst, b.FeeRecipient...)

	// Field (1) 'Amount'
	dst = ssz.MarshalUint64(dst, uint64(b.Amount))

	// Field (2) 'BuilderIndex'
	dst = ssz.MarshalUint64(dst, uint64(b.BuilderIndex))

	// Field (3) 'WithdrawableEpoch'
	dst = ssz.MarshalUint64(dst, uint64(b.WithdrawableEpoch))

	return
}

// UnmarshalSSZ ssz unmarshals the BuilderPendingWithdrawal object
func (b *BuilderPendingWithdrawal) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size != 44 {
		return ssz.ErrSize
	}

	// Field (0) 'FeeRecipient'
	if cap(b.FeeRecipient) == 0 {
		b.FeeRecipient = make([]byte, 0, len(buf[0:20]))
	}
	b.FeeRecipient = append(b.FeeRecipient, buf[0:20]...)

	// Field (1) 'Amount'
	b.Amount = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Gwei(ssz.UnmarshallUint64(buf[20:28]))

	// Field (2) 'BuilderIndex'
	b.BuilderIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[28:36]))

	// Field (3) 'WithdrawableEpoch'
	b.WithdrawableEpoch = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Epoch(ssz.UnmarshallUint64(buf[36:44]))

	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the BuilderPendingWithdrawal object
func (b *BuilderPendingWithdrawal) SizeSSZ() (size int) {
	size = 44
	return
}

// HashTreeRoot ssz hashes the BuilderPendingWithdrawal object
func (b *BuilderPendingWithdrawal) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(b)
}

// HashTreeRootWith ssz hashes the BuilderPendingWithdrawal object with a hasher
func (b *BuilderPendingWithdrawal) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'FeeRecipient'
	if size := len(b.FeeRecipient); size != 20 {
		err = ssz.ErrBytesLengthFn("--.FeeRecipient", size, 20)
		return
	}
	hh.PutBytes(b.FeeRecipient)

	// Field (1) 'Amount'
	hh.PutUint64(uint64(b.Amount))

	// Field (2) 'BuilderIndex'
	hh.PutUint64(uint64(b.BuilderIndex))

	// Field (3) 'WithdrawableEpoch'
	hh.PutUint64(uint64(b.WithdrawableEpoch))

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the DataColumnSidecarGloas object
func (d *DataColumnSidecarGloas) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(d)
}

// MarshalSSZTo ssz marshals the DataColumnSidecarGloas object to a target array
func (d *DataColumnSidecarGloas) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(60)

	// Field (0) 'Index'
	dst = ssz.MarshalUint64(dst, d.Index)

	// Offset (1) 'Column'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(d.Column) * 2048

	// Offset (2) 'KzgCommitments'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(d.KzgCommitments) * 48

	// Offset (3) 'KzgProofs'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(d.KzgProofs) * 48

	// Field (4) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(d.Slot))

	// Field (5) 'BeaconBlockRoot'
	if size := len(d.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	dst = append(dst, d.BeaconBlockRoot...)

	// Field (1) 'Column'
	if size := len(d.Column); size > 4096 {
		err = ssz.ErrListTooBigFn("--.Column", size, 4096)
		return
	}
	for ii := 0; ii < len(d.Column); ii++ {
		if size := len(d.Column[ii]); size != 2048 {
			err = ssz.ErrBytesLengthFn("--.Column[ii]", size, 2048)
			return
		}
		dst = append(dst, d.Column[ii]...)
	}

	// Field (2) 'KzgCommitments'
	if size := len(d.KzgCommitments); size > 4096 {
		err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096)
		return
	}
	for ii := 0; ii < len(d.KzgCommitments); ii++ {
		if size := len(d.KzgCommitments[ii]); size != 48 {
			err = ssz.ErrBytesLengthFn("--.KzgCommitments[ii]", size, 48)
			return
		}
		dst = append(dst, d.KzgCommitments[ii]...)
	}

	// Field (3) 'KzgProofs'
	if size := len(d.KzgProofs); size > 4096 {
		err = ssz.ErrListTooBigFn("--.KzgProofs", size, 4096)
		return
	}
	for ii := 0; ii < len(d.KzgProofs); ii++ {
		if size := len(d.KzgProofs[ii]); size != 48 {
			err = ssz.ErrBytesLengthFn("--.KzgProofs[ii]", size, 48)
			return
		}
		dst = append(dst, d.KzgProofs[ii]...)
	}

	return
}

// UnmarshalSSZ ssz unmarshals the DataColumnSidecarGloas object
func (d *DataColumnSidecarGloas) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 60 {
		return ssz.ErrSize
	}

	tail := buf
	var o1, o2, o3 uint64

	// Field (0) 'Index'
	d.Index = ssz.UnmarshallUint64(buf[0:8])

	// Offset (1) 'Column'
	if o1 = ssz.ReadOffset(buf[8:12]); o1 > size {
		return ssz.ErrOffset
	}

	if o1 != 60 {
		return ssz.ErrInvalidVariableOffset
	}

	// Offset (2) 'KzgCommitments'
	if o2 = ssz.ReadOffset(buf[12:16]); o2 > size || o1 > o2 {
		return ssz.ErrOffset
	}

	// Offset (3) 'KzgProofs'
	if o3 = ssz.ReadOffset(buf[16:20]); o3 > size || o2 > o3 {
		return ssz.ErrOffset
	}

	// Field (4) 'Slot'
	d.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[20:28]))

	// Field (5) 'BeaconBlockRoot'
	if cap(d.BeaconBlockRoot) == 0 {
		d.BeaconBlockRoot = make([]byte, 0, len(buf[28:60]))
	}
	d.BeaconBlockRoot = append(d.BeaconBlockRoot, buf[28:60]...)

	// Field (1) 'Column'
	{
		buf = tail[o1:o2]
		num, err := ssz.DivideInt2(len(buf), 2048, 4096)
		if err != nil {
			return err
		}
		d.Column = make([][]byte, num)
		for ii := 0; ii < num; ii++ {
			if cap(d.Column[ii]) == 0 {
				d.Column[ii] = make([]byte, 0, len(buf[ii*2048:(ii+1)*2048]))
			}
			d.Column[ii] = append(d.Column[ii], buf[ii*2048:(ii+1)*2048]...)
		}
	}

	// Field (2) 'KzgCommitments'
	{
		buf = tail[o2:o3]
		num, err := ssz.DivideInt2(len(buf), 48, 4096)
		if err != nil {
			return err
		}
		d.KzgCommitments = make([][]byte, num)
		for ii := 0; ii < num; ii++ {
			if cap(d.KzgCommitments[ii]) == 0 {
				d.KzgCommitments[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48]))
			}
			d.KzgCommitments[ii] = append(d.KzgCommitments[ii], buf[ii*48:(ii+1)*48]...)
		}
	}

	// Field (3) 'KzgProofs'
	{
		buf = tail[o3:]
		num, err := ssz.DivideInt2(len(buf), 48, 4096)
		if err != nil {
			return err
		}
		d.KzgProofs = make([][]byte, num)
		for ii := 0; ii < num; ii++ {
			if cap(d.KzgProofs[ii]) == 0 {
				d.KzgProofs[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48]))
			}
			d.KzgProofs[ii] = append(d.KzgProofs[ii], buf[ii*48:(ii+1)*48]...)
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the DataColumnSidecarGloas object
func (d *DataColumnSidecarGloas) SizeSSZ() (size int) {
	size = 60

	// Field (1) 'Column'
	size += len(d.Column) * 2048

	// Field (2) 'KzgCommitments'
	size += len(d.KzgCommitments) * 48

	// Field (3) 'KzgProofs'
	size += len(d.KzgProofs) * 48

	return
}

// HashTreeRoot ssz hashes the DataColumnSidecarGloas object
func (d *DataColumnSidecarGloas) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(d)
}

// HashTreeRootWith ssz hashes the DataColumnSidecarGloas object with a hasher
func (d *DataColumnSidecarGloas) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Index'
	hh.PutUint64(d.Index)

	// Field (1) 'Column'
	{
		if size := len(d.Column); size > 4096 {
			err = ssz.ErrListTooBigFn("--.Column", size, 4096)
			return
		}
		subIndx := hh.Index()
		for _, i := range d.Column {
			if len(i) != 2048 {
				err = ssz.ErrBytesLength
				return
			}
			hh.PutBytes(i)
		}

		numItems := uint64(len(d.Column))
		hh.MerkleizeWithMixin(subIndx, numItems, 4096)
	}

	// Field (2) 'KzgCommitments'
	{
		if size := len(d.KzgCommitments); size > 4096 {
			err = ssz.ErrListTooBigFn("--.KzgCommitments", size, 4096)
			return
		}
		subIndx := hh.Index()
		for _, i := range d.KzgCommitments {
			if len(i) != 48 {
				err = ssz.ErrBytesLength
				return
			}
			hh.PutBytes(i)
		}

		numItems := uint64(len(d.KzgCommitments))
		hh.MerkleizeWithMixin(subIndx, numItems, 4096)
	}

	// Field (3) 'KzgProofs'
	{
		if size := len(d.KzgProofs); size > 4096 {
			err = ssz.ErrListTooBigFn("--.KzgProofs", size, 4096)
			return
		}
		subIndx := hh.Index()
		for _, i := range d.KzgProofs {
			if len(i) != 48 {
				err = ssz.ErrBytesLength
				return
			}
			hh.PutBytes(i)
		}

		numItems := uint64(len(d.KzgProofs))
		hh.MerkleizeWithMixin(subIndx, numItems, 4096)
	}

	// Field (4) 'Slot'
	hh.PutUint64(uint64(d.Slot))

	// Field (5) 'BeaconBlockRoot'
	if size := len(d.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	hh.PutBytes(d.BeaconBlockRoot)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the ExecutionPayloadEnvelope object
func (e *ExecutionPayloadEnvelope) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(e)
}

// MarshalSSZTo ssz marshals the ExecutionPayloadEnvelope object to a target array
func (e *ExecutionPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(92)

	// Offset (0) 'Payload'
	dst = ssz.WriteOffset(dst, offset)
	if e.Payload == nil {
		e.Payload = new(v1.ExecutionPayloadDeneb)
	}
	offset += e.Payload.SizeSSZ()

	// Offset (1) 'ExecutionRequests'
	dst = ssz.WriteOffset(dst, offset)
	if e.ExecutionRequests == nil {
		e.ExecutionRequests = new(v1.ExecutionRequests)
	}
	offset += e.ExecutionRequests.SizeSSZ()

	// Field (2) 'BuilderIndex'
	dst = ssz.MarshalUint64(dst, uint64(e.BuilderIndex))

	// Field (3) 'BeaconBlockRoot'
	if size := len(e.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	dst = append(dst, e.BeaconBlockRoot...)

	// Field (4) 'Slot'
	dst = ssz.MarshalUint64(dst, uint64(e.Slot))

	// Offset (5) 'BlobKzgCommitments'
	dst = ssz.WriteOffset(dst, offset)
	offset += len(e.BlobKzgCommitments) * 48

	// Field (6) 'StateRoot'
	if size := len(e.StateRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32)
		return
	}
	dst = append(dst, e.StateRoot...)

	// Field (0) 'Payload'
	if dst, err = e.Payload.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (1) 'ExecutionRequests'
	if dst, err = e.ExecutionRequests.MarshalSSZTo(dst); err != nil {
		return
	}

	// Field (5) 'BlobKzgCommitments'
	if size := len(e.BlobKzgCommitments); size > 4096 {
		err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096)
		return
	}
	for ii := 0; ii < len(e.BlobKzgCommitments); ii++ {
		if size := len(e.BlobKzgCommitments[ii]); size != 48 {
			err = ssz.ErrBytesLengthFn("--.BlobKzgCommitments[ii]", size, 48)
			return
		}
		dst = append(dst, e.BlobKzgCommitments[ii]...)
	}

	return
}

// UnmarshalSSZ ssz unmarshals the ExecutionPayloadEnvelope object
func (e *ExecutionPayloadEnvelope) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 92 {
		return ssz.ErrSize
	}

	tail := buf
	var o0, o1, o5 uint64

	// Offset (0) 'Payload'
	if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
		return ssz.ErrOffset
	}

	if o0 != 92 {
		return ssz.ErrInvalidVariableOffset
	}

	// Offset (1) 'ExecutionRequests'
	if o1 = ssz.ReadOffset(buf[4:8]); o1 > size || o0 > o1 {
		return ssz.ErrOffset
	}

	// Field (2) 'BuilderIndex'
	e.BuilderIndex = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.ValidatorIndex(ssz.UnmarshallUint64(buf[8:16]))

	// Field (3) 'BeaconBlockRoot'
	if cap(e.BeaconBlockRoot) == 0 {
		e.BeaconBlockRoot = make([]byte, 0, len(buf[16:48]))
	}
	e.BeaconBlockRoot = append(e.BeaconBlockRoot, buf[16:48]...)

	// Field (4) 'Slot'
	e.Slot = github_com_OffchainLabs_prysm_v7_consensus_types_primitives.Slot(ssz.UnmarshallUint64(buf[48:56]))

	// Offset (5) 'BlobKzgCommitments'
	if o5 = ssz.ReadOffset(buf[56:60]); o5 > size || o1 > o5 {
		return ssz.ErrOffset
	}

	// Field (6) 'StateRoot'
	if cap(e.StateRoot) == 0 {
		e.StateRoot = make([]byte, 0, len(buf[60:92]))
	}
	e.StateRoot = append(e.StateRoot, buf[60:92]...)

	// Field (0) 'Payload'
	{
		buf = tail[o0:o1]
		if e.Payload == nil {
			e.Payload = new(v1.ExecutionPayloadDeneb)
		}
		if err = e.Payload.UnmarshalSSZ(buf); err != nil {
			return err
		}
	}

	// Field (1) 'ExecutionRequests'
	{
		buf = tail[o1:o5]
		if e.ExecutionRequests == nil {
			e.ExecutionRequests = new(v1.ExecutionRequests)
		}
		if err = e.ExecutionRequests.UnmarshalSSZ(buf); err != nil {
			return err
		}
	}

	// Field (5) 'BlobKzgCommitments'
	{
		buf = tail[o5:]
		num, err := ssz.DivideInt2(len(buf), 48, 4096)
		if err != nil {
			return err
		}
		e.BlobKzgCommitments = make([][]byte, num)
		for ii := 0; ii < num; ii++ {
			if cap(e.BlobKzgCommitments[ii]) == 0 {
				e.BlobKzgCommitments[ii] = make([]byte, 0, len(buf[ii*48:(ii+1)*48]))
			}
			e.BlobKzgCommitments[ii] = append(e.BlobKzgCommitments[ii], buf[ii*48:(ii+1)*48]...)
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the ExecutionPayloadEnvelope object
func (e *ExecutionPayloadEnvelope) SizeSSZ() (size int) {
	size = 92

	// Field (0) 'Payload'
	if e.Payload == nil {
		e.Payload = new(v1.ExecutionPayloadDeneb)
	}
	size += e.Payload.SizeSSZ()

	// Field (1) 'ExecutionRequests'
	if e.ExecutionRequests == nil {
		e.ExecutionRequests = new(v1.ExecutionRequests)
	}
	size += e.ExecutionRequests.SizeSSZ()

	// Field (5) 'BlobKzgCommitments'
	size += len(e.BlobKzgCommitments) * 48

	return
}

// HashTreeRoot ssz hashes the ExecutionPayloadEnvelope object
func (e *ExecutionPayloadEnvelope) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(e)
}

// HashTreeRootWith ssz hashes the ExecutionPayloadEnvelope object with a hasher
func (e *ExecutionPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Payload'
	if err = e.Payload.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (1) 'ExecutionRequests'
	if err = e.ExecutionRequests.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (2) 'BuilderIndex'
	hh.PutUint64(uint64(e.BuilderIndex))

	// Field (3) 'BeaconBlockRoot'
	if size := len(e.BeaconBlockRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.BeaconBlockRoot", size, 32)
		return
	}
	hh.PutBytes(e.BeaconBlockRoot)

	// Field (4) 'Slot'
	hh.PutUint64(uint64(e.Slot))

	// Field (5) 'BlobKzgCommitments'
	{
		if size := len(e.BlobKzgCommitments); size > 4096 {
			err = ssz.ErrListTooBigFn("--.BlobKzgCommitments", size, 4096)
			return
		}
		subIndx := hh.Index()
		for _, i := range e.BlobKzgCommitments {
			if len(i) != 48 {
				err = ssz.ErrBytesLength
				return
			}
			hh.PutBytes(i)
		}

		numItems := uint64(len(e.BlobKzgCommitments))
		hh.MerkleizeWithMixin(subIndx, numItems, 4096)
	}

	// Field (6) 'StateRoot'
	if size := len(e.StateRoot); size != 32 {
		err = ssz.ErrBytesLengthFn("--.StateRoot", size, 32)
		return
	}
	hh.PutBytes(e.StateRoot)

	hh.Merkleize(indx)
	return
}

// MarshalSSZ ssz marshals the SignedExecutionPayloadEnvelope object
func (s *SignedExecutionPayloadEnvelope) MarshalSSZ() ([]byte, error) {
	return ssz.MarshalSSZ(s)
}

// MarshalSSZTo ssz marshals the SignedExecutionPayloadEnvelope object to a target array
func (s *SignedExecutionPayloadEnvelope) MarshalSSZTo(buf []byte) (dst []byte, err error) {
	dst = buf
	offset := int(100)

	// Offset (0) 'Message'
	dst = ssz.WriteOffset(dst, offset)
	if s.Message == nil {
		s.Message = new(ExecutionPayloadEnvelope)
	}
	offset += s.Message.SizeSSZ()

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	dst = append(dst, s.Signature...)

	// Field (0) 'Message'
	if dst, err = s.Message.MarshalSSZTo(dst); err != nil {
		return
	}

	return
}

// UnmarshalSSZ ssz unmarshals the SignedExecutionPayloadEnvelope object
func (s *SignedExecutionPayloadEnvelope) UnmarshalSSZ(buf []byte) error {
	var err error
	size := uint64(len(buf))
	if size < 100 {
		return ssz.ErrSize
	}

	tail := buf
	var o0 uint64

	// Offset (0) 'Message'
	if o0 = ssz.ReadOffset(buf[0:4]); o0 > size {
		return ssz.ErrOffset
	}

	if o0 != 100 {
		return ssz.ErrInvalidVariableOffset
	}

	// Field (1) 'Signature'
	if cap(s.Signature) == 0 {
		s.Signature = make([]byte, 0, len(buf[4:100]))
	}
	s.Signature = append(s.Signature, buf[4:100]...)

	// Field (0) 'Message'
	{
		buf = tail[o0:]
		if s.Message == nil {
			s.Message = new(ExecutionPayloadEnvelope)
		}
		if err = s.Message.UnmarshalSSZ(buf); err != nil {
			return err
		}
	}
	return err
}

// SizeSSZ returns the ssz encoded size in bytes for the SignedExecutionPayloadEnvelope object
func (s *SignedExecutionPayloadEnvelope) SizeSSZ() (size int) {
	size = 100

	// Field (0) 'Message'
	if s.Message == nil {
		s.Message = new(ExecutionPayloadEnvelope)
	}
	size += s.Message.SizeSSZ()

	return
}

// HashTreeRoot ssz hashes the SignedExecutionPayloadEnvelope object
func (s *SignedExecutionPayloadEnvelope) HashTreeRoot() ([32]byte, error) {
	return ssz.HashWithDefaultHasher(s)
}

// HashTreeRootWith ssz hashes the SignedExecutionPayloadEnvelope object with a hasher
func (s *SignedExecutionPayloadEnvelope) HashTreeRootWith(hh *ssz.Hasher) (err error) {
	indx := hh.Index()

	// Field (0) 'Message'
	if err = s.Message.HashTreeRootWith(hh); err != nil {
		return
	}

	// Field (1) 'Signature'
	if size := len(s.Signature); size != 96 {
		err = ssz.ErrBytesLengthFn("--.Signature", size, 96)
		return
	}
	hh.PutBytes(s.Signature)

	hh.Merkleize(indx)
	return
}
