"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.eventKey = eventKey;
exports.insertOrderedAscending = insertOrderedAscending;
var tslib_1 = require("tslib");
var sortedLastIndexBy_1 = tslib_1.__importDefault(require("lodash/sortedLastIndexBy"));
function eventKey(event) {
    var _a;
    return [
        event.blockNumber.toString().padStart(16, "0"),
        event.transactionIndex.toString().padStart(16, "0"),
        (_a = event.logIndex) === null || _a === void 0 ? void 0 : _a.toString().padStart(16, "0"),
    ].join("~");
}
function insertOrderedAscending(array, element, orderBy) {
    var index = (0, sortedLastIndexBy_1.default)(array, element, orderBy);
    array.splice(index, 0, element);
    return array;
}
//# sourceMappingURL=utils.js.map