AccountAddress being zeroed out

Hi all,

I have a map in my smart contract which uses an AccountAddress as the key.
I wrote a view function which takes in an AccountAddress and looks up the value in the map and my tests kept failing.

I looked through the code and noticed that the first 4 bits of the AccountAddress in the viewing function are zeroed out (they should all be 1).

This happens every time. Before sending the value in the structure is correct and in the view function it is corrupted.

If I wrap the AccountAddress in a struct then the same happens. If I put a u32 before it in the structure then that is zeroed out.

Anyone have any idea as to why this is happening?

It is hard to give help without seeing the code.

Can you show your parameters to the view function, and how they are parsed?

And how do you supply the parameters when calling the view function. Is it via concordium-client?