UNPKG

@solvprotocol/upgrade-safe-transpiler

Version:

Solidity preprocessor used to generate OpenZeppelin Contracts Upgrade Safe.

15 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.srcDecoder = void 0; function srcDecoder(output) { return src => { const [start, length, sourceId] = src.split(':').map(s => parseInt(s)); const source = Object.keys(output.sources).find(s => output.sources[s].id === sourceId); if (source === undefined) { throw new Error(`No source with id ${sourceId}`); } return { start, length, source }; }; } exports.srcDecoder = srcDecoder; //# sourceMappingURL=src-decoder.js.map