@multiversx/sdk-core
Advanced tools
Comparing version 13.13.0 to 13.13.1
@@ -8,4 +8,4 @@ "use strict"; | ||
decodeNested(buffer) { | ||
const codeMetadata = codeMetadata_1.CodeMetadata.fromBuffer(buffer); | ||
return [new codeMetadata_2.CodeMetadataValue(codeMetadata), length]; | ||
const codeMetadata = codeMetadata_1.CodeMetadata.fromBuffer(buffer.slice(0, codeMetadata_1.CodeMetadataLength)); | ||
return [new codeMetadata_2.CodeMetadataValue(codeMetadata), codeMetadata_1.CodeMetadataLength]; | ||
} | ||
@@ -12,0 +12,0 @@ decodeTopLevel(buffer) { |
/// <reference types="node" /> | ||
export declare const CodeMetadataLength = 2; | ||
/** | ||
@@ -10,3 +11,2 @@ * The metadata of a Smart Contract, as an abstraction. | ||
payableBySc: boolean; | ||
private static readonly codeMetadataLength; | ||
static ByteZero: { | ||
@@ -13,0 +13,0 @@ Upgradeable: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CodeMetadata = void 0; | ||
exports.CodeMetadata = exports.CodeMetadataLength = void 0; | ||
exports.CodeMetadataLength = 2; | ||
/** | ||
@@ -29,4 +30,4 @@ * The metadata of a Smart Contract, as an abstraction. | ||
static fromBuffer(buffer) { | ||
if (buffer.length < this.codeMetadataLength) { | ||
throw new Error("Buffer is too short."); | ||
if (buffer.length != exports.CodeMetadataLength) { | ||
throw new Error(`code metadata buffer has length ${buffer.length}, expected ${exports.CodeMetadataLength}`); | ||
} | ||
@@ -110,3 +111,2 @@ const byteZero = buffer[0]; | ||
exports.CodeMetadata = CodeMetadata; | ||
CodeMetadata.codeMetadataLength = 2; | ||
CodeMetadata.ByteZero = { | ||
@@ -113,0 +113,0 @@ Upgradeable: 1, |
{ | ||
"name": "@multiversx/sdk-core", | ||
"version": "13.13.0", | ||
"version": "13.13.1", | ||
"description": "MultiversX SDK for JavaScript and TypeScript", | ||
@@ -5,0 +5,0 @@ "author": "MultiversX", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1289772