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?