task-23-npm-smart-contract-deploy
v1.0.0
Published
Task 23: npm - Smart Contract Deploy
Readme
task-23-npm-smart-contract-deploy
Task 23: npm - Smart Contract Deploy
Installation
npm install task-23-npm-smart-contract-deploy
Usage
import { deploy, getCostComparison, estimateCost, getNetworkStatus, } from 'task-23-npm-smart-contract-deploy';
Deploy a Smart Contract
const result = await deploy(options); console.log(result);
Get Cost Comparison
const comparison = await getCostComparison(); console.log(comparison.near, comparison.ethereum, comparison.solana);
Estimate Cost
const estimate = await estimateCost('near'); console.log(estimate.chain, estimate.estimatedCost, estimate.savings);
Get Network Status
const status = await getNetworkStatus('mainnet'); console.log(status.status, status.chainId, status.latestBlock);
API
deploy(options: DeployOptions = {}): Promise<DeployResult>
Deploys a smart contract using the provided options.
getCostComparison(): Promise<CostComparison>
Returns cost comparison data across supported chains (NEAR, Ethereum, Solana, Avalanche).
estimateCost(chain: string = 'near'): Promise<{ chain: string; estimatedCost: string; savings: string }>
Estimates the deployment cost for the specified chain. Defaults to 'near'.
getNetworkStatus(networkId: 'mainnet' | 'testnet' = 'mainnet'): Promise<{ status: string; chainId: string; latestBlock: number }>
Returns the current network status for the given network ID. Defaults to 'mainnet'.
License
MIT
