UNPKG

sevm

Version:

A Symbolic Ethereum Virtual Machine (EVM) bytecode decompiler & analyzer library & CLI

40 lines 848 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isElemType = void 0; /** * Determine whether the given `type` is a valid elementary Solidity type. * * @see {@link Type} definition for more info on `Type`. * * @param type value to check if it is a valid elementary type. * @returns */ function isElemType(type) { return ELEM_TYPES.includes(type); } exports.isElemType = isElemType; /** * */ const BITS = [...Array(32).keys()].map(n => (n + 1) * 8); /** * */ const BYTES = [...Array(32).keys()].map(n => n + 1); /** * */ const ELEM_TYPES = [ 'address', 'address payable', 'bool', 'uint', ...BITS.map(n => `uint${n}`), 'int', ...BITS.map(n => `int${n}`), 'bytes', ...BYTES.map(n => `bytes${n}`), 'string', 'function', ]; //# sourceMappingURL=type.js.map