func (s *Service) Balance(ctx context.Context) (bal *big.Int, err error) {
	if s.chequebookBalanceFunc != nil {
		return s.chequebookBalanceFunc(ctx)
	}
	return big.NewInt(0), errors.New("Error")
}
Balance mocks the chequebook .Balance function
package mock
import (
	"context"
	"errors"
	"math/big"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethsana/sana/pkg/settlement/swap/chequebook"
)
type Service struct {
	chequebookBalanceFunc          func(context.Context) (*big.Int, error)
	chequebookAvailableBalanceFunc func(context.Context) (*big.Int, error)
	chequebookAddressFunc          func() common.Address
	chequebookIssueFunc            func(ctx context.Context, beneficiary common.Address, amount *big.Int, sendChequeFunc chequebook.SendChequeFunc) (*big.Int, error)
	chequebookWithdrawFunc         func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)
	chequebookDepositFunc          func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)
	lastChequeFunc                 func(common.Address) (*chequebook.SignedCheque, error)
	lastChequesFunc                func() (map[common.Address]*chequebook.SignedCheque, error)
}
func WithChequebookBalanceFunc(f func(ctx context.Context) (*big.Int, error)) Option {
	return optionFunc(func(s *Service) {
		s.chequebookBalanceFunc = f
	})
}
func WithChequebookAvailableBalanceFunc(f func(ctx context.Context) (*big.Int, error)) Option {
	return optionFunc(func(s *Service) {
		s.chequebookAvailableBalanceFunc = f
	})
}
func WithChequebookAddressFunc(f func() common.Address) Option {
	return optionFunc(func(s *Service) {
		s.chequebookAddressFunc = f
	})
}
func WithChequebookDepositFunc(f func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)) Option {
	return optionFunc(func(s *Service) {
		s.chequebookDepositFunc = f
	})
}
func WithChequebookIssueFunc(f func(ctx context.Context, beneficiary common.Address, amount *big.Int, sendChequeFunc chequebook.SendChequeFunc) (*big.Int, error)) Option {
	return optionFunc(func(s *Service) {
		s.chequebookIssueFunc = f
	})
}
func WithChequebookWithdrawFunc(f func(ctx context.Context, amount *big.Int) (hash common.Hash, err error)) Option {
	return optionFunc(func(s *Service) {
		s.chequebookWithdrawFunc = f
	})
}
func WithLastChequeFunc(f func(beneficiary common.Address) (*chequebook.SignedCheque, error)) Option {
	return optionFunc(func(s *Service) {
		s.lastChequeFunc = f
	})
}
func WithLastChequesFunc(f func() (map[common.Address]*chequebook.SignedCheque, error)) Option {
	return optionFunc(func(s *Service) {
		s.lastChequesFunc = f
	})
}
func NewChequebook(opts ...Option) chequebook.Service {
	mock := new(Service)
	for _, o := range opts {
		o.apply(mock)
	}
	return mock
}