It is often useful to embed constants into contracts. We do this often for keys or addresses in tests. Currently the only way to do this is to embed a representation such as
const ACC = [0u8; 32]
meaning a low-level representation. Similar for keys and signatures which is even more inconvenient since those are typically generated as hex strings by various tools.
A related issue is embedding compile time constants defined by environment variables. This can only be done if the constant is a str without resorting to writing custom macros. We should provide macros in concordium-std that allow for embedding of such constants.
Task description
It is often useful to embed constants into contracts. We do this often for keys or addresses in tests. Currently the only way to do this is to embed a representation such as
meaning a low-level representation. Similar for keys and signatures which is even more inconvenient since those are typically generated as hex strings by various tools.
A related issue is embedding compile time constants defined by environment variables. This can only be done if the constant is a
str
without resorting to writing custom macros. We should provide macros in concordium-std that allow for embedding of such constants.