UNPKG

@aut-labs/sdk

Version:

The TS/JS SDK package aims to make it easy for frontends/backends to integrate with Aut Smart Contracts

16 lines 705 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.deployContract = void 0; const ethers_1 = require("ethers"); const deployContract = async ({ address = null, abi, signer, bytecode, args = [] }) => { if (!address || address === ethers_1.ethers.ZeroAddress) { const contract = new ethers_1.ethers.ContractFactory(abi, bytecode, signer); const deploy = await contract.deploy(...args); const deploymentReceipt = await deploy.waitForDeployment(); const address = await deploymentReceipt.getAddress(); return address; } return address; }; exports.deployContract = deployContract; //# sourceMappingURL=deploy-contract.js.map