How I can deserialize in borsh UnorderedMap? Near

83 Views Asked by At

How I can deserialize in borsh UnorderedMap?

Now my schema is

const schema = new Map([
  [
    Record,
    {
      kind: "struct",
      fields: [
        ["x2", { kind: 'map', key: 'string', value: 'u128'}],
      ],
    },
  ],
]);

Rust struct:

pub struct Counter {
    x2: UnorderedMap<AccountId, Balance>,
}

But I have error: "Expected buffer length 2036811841 isn't within bounds"

0

There are 0 best solutions below