"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.queryAllReadonlyContracts = exports.waitForTx = void 0;
const lodash_1 = require("lodash");
const promises_1 = require("../../utils/promises");
async function waitForTx(txToSubmit) {
    const tx = await txToSubmit;
    return tx.wait();
}
exports.waitForTx = waitForTx;
const queryAllReadonlyContracts = (call, contracts) => {
    return (0, promises_1.tryInSequence)((0, lodash_1.shuffle)(contracts).map((contract) => {
        return () => call(contract);
    }));
};
exports.queryAllReadonlyContracts = queryAllReadonlyContracts;
//# sourceMappingURL=contract.js.map