gbangbolaoluwagbemiga-stacks-helpers-deploy
v1.0.0
Published
Deploy, verify, and manage Stacks L2 smart contracts
Maintainers
Readme
stacks-helpers-deploy
Deploy, verify, and manage Stacks L2 smart contracts.
Repository: Gbangbolaoluwagbemiga/stacks-helpers-deploy
Install
npm install gbangbolaoluwagbemiga-stacks-helpers-deployUsage
import { deployContract, getContractInfo, isContractDeployed } from "gbangbolaoluwagbemiga-stacks-helpers-deploy";
// Deploy a contract
const result = await deployContract({
contractName: "my-contract",
codeBody: "(define-public (hello) (ok \"world\"))",
senderKey: "your-private-key",
});
// Check if a contract is deployed
const exists = await isContractDeployed("SP...", "contract-name");
// Get contract info
const info = await getContractInfo("SP...", "contract-name");
// Returns: { source, publishHeight, clarityVersion, txId }API
deployContract(options)
Deploy a Clarity contract to mainnet/testnet. Options:
contractName— Name of the contractcodeBody— Clarity source codesenderKey— Deployer's private keynetwork?— Stacks networknonce?— Transaction noncefee?— Transaction fee
getContractInfo(contractAddress, contractName, networkUrl?)
Fetch deployed contract information.
isContractDeployed(contractAddress, contractName, networkUrl?)
Check if a contract exists on-chain.
License
MIT
Author
gbangbolaoluwagbemiga
