code: func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (common.Hash, error) {
  	if err := b.SendTx(ctx, tx); err != nil {
  		return common.Hash{}, err
  	}
  	if tx.To() == nil {
  		signer := types.MakeSigner(b.ChainConfig(), b.CurrentBlock().Number())
  		from, err := types.Sender(signer, tx)
  		if err != nil {
  			return common.Hash{}, err
  		}
  		addr := crypto.CreateAddress(from, tx.Nonce())
  		log.Info("Submitted contract creation", "fullhash", tx.Hash().Hex(), "contract", addr.Hex())
  	} else {
  		log.Info("Submitted transaction", "fullhash", tx.Hash().Hex(), "recipient", tx.To())
  	}
  	return tx.Hash(), nil
  }
docs: // SubmitTransaction is a helper function that submits tx to txPool and logs a message.