"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useArrakisResolver = void 0;
var react_1 = require("react");
var common_1 = require("../common");
var typechain_1 = require("../../typechain");
var utils_1 = require("../../utils");
function useArrakisResolver(chain) {
    var signerOrProvider = (0, common_1.useSignerOrProvider)(chain);
    return (0, react_1.useMemo)(function () {
        if (!signerOrProvider || !chain)
            return;
        return typechain_1.IArrakisV2Resolver__factory.connect((0, utils_1.getArrakisAddr)(chain).ArrakisV2Resolver, signerOrProvider);
    }, [chain, signerOrProvider]);
}
exports.useArrakisResolver = useArrakisResolver;
//# sourceMappingURL=useArrakisResolver.js.map