Closed tk-o closed 3 years ago
This should be a solved issue. You can try to upgrade to the latest version v0.11.9-0 (Note that it is all redspot related dependencies. including redspot
@redspot/patract
etc.)
@ii-ii-ii, thank you for a prompt response! I'll give it a try 🤞
Nice, the dependencies update solved the issue. Thanks @ii-ii-ii 🤝
I am using a simple Erc20 smart contract, that allows including its name and symbol. Here's how I define getters for these two fields.
I noticed, that the value stored in the smart contract is exactly (byte by byte) the same as the one passed into the contract's constructor. So far so good.
But when I query any of these fields, I get the 2 extra bytes at the beginning of the stored value:
Because of these 2 extra bytes, I can't really assert equality in my tests, as the returned value is pre-fixed with 2 extra bytes.
Where these 2 extra bytes come from? I also tested using
Vec<u8>
as a return type for getters. Same story: the value in the contract storage is exactly the same, while the value returned into JS runtime has 2 extra bytes at the beginning.