"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeConstructorBytecode = void 0;
const ethers_1 = require("ethers");
async function decodeConstructorBytecode(abi, bytecode, provider, params) {
    let contractFactory = new ethers_1.ethers.ContractFactory(abi, bytecode);
    try {
        let data = await provider.call({
            data: contractFactory.getDeployTransaction(...params).data
        });
        let iface = new ethers_1.ethers.utils.Interface(abi);
        let _data = await iface.decodeFunctionResult("getType", data);
        return (_data);
    }
    catch (error) {
        throw error;
    }
}
exports.decodeConstructorBytecode = decodeConstructorBytecode;
//# sourceMappingURL=decode-bytecode.js.map