Define an environment from tcbhighmath

Let's assume that I have defined very carefully the parameters of the highlight math style from the tcolorbox package.

I would like to define an environment

\newenvironment{equationbox}{%
$$% \tcbhighmath{% opening tcbhighmath }{% }% closing tcbhighmath$$%
}


so that the result of using the environment would be:

$$\tcbhighmath{%the environment contents%}$$


The current version is obviously not working. I tried to replace the braces with \bgroup \egroup but it does not seem to work either. How to do it?

The environ package seems to be made for this.

\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{environ}
\NewEnviron{equationbox}{%
$$% \tcbhighmath{\BODY}$$%
}

\begin{document}
$$% \tcbhighmath{E=mc^2}$$
\begin{equationbox}
E=mc^2
\end{equationbox}
\end{document}