UNPKG

@signumjs/contracts

Version:

Smart Contracts package for Signum Network

18 lines 502 B
"use strict"; /** * Copyright (c) 2022 Signum Network */ Object.defineProperty(exports, "__esModule", { value: true }); exports.countDataPages = countDataPages; /** * Counts the data pages for given initialization data stack * * @param dataHex The contracts initial data stack in hex form * @return The number of data pages for the passed data * * */ function countDataPages(dataHex) { return Math.max(Math.ceil((dataHex.length / 16) / 32), 1); } //# sourceMappingURL=countDataPages.js.map