Cargo concordium could not build contract


We have developed a smart contract, however we get the following error when running cargo concordium build.

Error: Could not build smart contract.

Caused by:
0: Could not validate resulting smart contract module.
1: Unknown value type byte 0x7c

What does this error mean? We are able to build the piggy bank example. We thought it might be because of our dependencies, but we dont know.

1 Like

Hi Honro,

And welcome to the Concordium support forum!

I understand your confusion. It is not the easiest error message to decipher. 0x7c is the byte code for the f64 type in WASM. So your contract uses floating-point numbers, which are not allowed in Concordium smart contracts. This limitation is explained in our documenation.

I hope that you can find a way around using floats in your contract. If not, let us know, and we can try to help you out.

Best regards,


I’ve created an issue, so we can improve the error message when using floats in the future :slight_smile:

1 Like

Thanks for the reply Kasper.

We don’t use floats, however one of our libraries might. So I guess we have to look them through and find which one does.

Good idea improving the error message hehe.

Hello again.

So we have found that the crate ‘curv kzen’ is causing the problem. We are using it to implement elliptic curve cryptograhpy. Is there some sort of workaround, or do you know any other crates for cryptography that are compatible?

Thanks :slight_smile: