diff --git a/src/bindings/typescript/serializers.ts b/src/bindings/typescript/serializers.ts index ef9c46311..2f23a8583 100644 --- a/src/bindings/typescript/serializers.ts +++ b/src/bindings/typescript/serializers.ts @@ -620,6 +620,7 @@ type MapSerializerDescrKey = | { kind: "address" }; type MapSerializerDescrValue = | { kind: "int" | "uint"; bits: number } + | { kind: "varuint"; length: number } | { kind: "boolean" } | { kind: "address" } | { kind: "cell" } @@ -665,6 +666,9 @@ function getValueParser(src: MapSerializerDescrValue) { return `Dictionary.Values.BigUint(${src.bits})`; } } + case "varuint": { + return `Dictionary.Values.BigVarUint(${src.length})`; + } case "address": { return "Dictionary.Values.Address()"; } @@ -739,7 +743,7 @@ const map: Serializer = { ) { value = { kind: "uint", bits: 256 }; } else if (src.valueFormat === "coins") { - value = { kind: "uint", bits: 124 }; + value = { kind: "varuint", length: 4 }; } } if (src.value === "address") { @@ -809,6 +813,10 @@ const map: Serializer = { } } break; + case "varuint": { + valueT = `bigint`; + break; + } case "boolean": { valueT = `boolean`;