npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

locklift-deploy-artifacts

v1.1.1

Published

Locklift plugin that enables you to store build artifacts across contract migration scripts.

Readme

Deploy artifacts plugin

Locklift plugin that enables you to store build artifacts across contract migration scripts.

Installation

  1. Install plugin.
npm i --save-dev locklift-deploy-artifacts
  1. Initialize the plugin via the locklift.config.ts file.
// locklift.config.ts
// ...
import { FactorySource } from "./build/factorySource";
import { DeployArtifactsExtension } from "locklift-deploy-artifacts";
import "locklift-deploy-artifacts";

declare module "locklift" {
  export interface Locklift<FactorySource> extends DeployArtifactsExtension<FactorySource> {}
}
// ...

Usage

The deploy artifacts plugin provides methods to interact with the build artifacts.

deployContract()

This method deploys a contract and saves its artifacts to the ./artifacts directory.

It takes arguments:

  • alias - the alias of the contract
  • version - the version of the contract, use "latest" to increment version
  • args - the deployment parameters, the same as you use at locklift.factory.deployContract()
  • deployFn - the function to deploy contract, default value locklift.factory.deployContract
const { contract, tx } = await locklift.deployArtifacts.deployContract(alias, version, args);

getArtifacts()

This method returns an object with the current state of the build artifacts:

// scripts/get_deploy_artifacts.ts
import { IDeployArtifacts } from "../artifacts/artifacts";
const artifacts = locklift.deployArtifacts.getArtifacts<IDeployArtifacts>();
console.log("SampleA contract address", artifacts.local.SampleA.v0.address)

read deploy artifacts

reset()

This method deletes all artifacts and resets storage:

locklift.deployArtifacts.reset();

getContract()

This method returns the instance of the deployed contract.

// scripts/get_deployed_contract.ts
import { IDeployArtifacts } from "../artifacts/artifacts";

async function main() {
  const artifacts = locklift.deployArtifacts.getArtifacts<IDeployArtifacts>();

  const sampleAv0 = locklift.deployArtifacts.getContract(artifacts.test.Sample.SampleA.v0);

  const details = await sampleAv0.methods.getDetails().call();
  console.log("details", details);
}
main()
  .then(() => process.exit(0))
  .catch(e => {
    console.log(e);
    process.exit(1);
  });

deploy contract with locklift-deploy-private plugin

// locklift.config.ts
import { LockliftConfig } from "locklift";
import { FactorySource } from "./build/factorySource";

import { DeployArtifactsExtension } from "locklift-deploy-artifacts";
import { LockliftConfigExtension, PrivateDeployerExtension } from "locklift-private-deploy";
import "locklift-deploy-artifacts";
import "locklift-private-deploy";

declare module "locklift" {
  export interface Locklift<FactorySource>
    extends DeployArtifactsExtension<FactorySource>,
      PrivateDeployerExtension<FactorySource> {}
  export interface LockliftConfig extends LockliftConfigExtension {}
}
declare global {
  const locklift: import("locklift").Locklift<FactorySource>;
}

const LOCAL_NETWORK_ENDPOINT = "http://localhost/graphql";

const VENOM_TESTNET_ENDPOINT = process.env.VENOM_TESTNET_ENDPOINT || "https://jrpc-testnet.venom.foundation/rpc";
const VENOM_TESTNET_TRACE_ENDPOINT =
  process.env.VENOM_TESTNET_TRACE_ENDPOINT || "https://gql-testnet.venom.foundation/graphql";

const config: LockliftConfig = {
  privateRPC: "https://private-rpc.com/rpc",
  // ...
}
// scripts/deploy.ts
async function main() {
  console.log("Starting Sample contract deployment...");

  const signer = (await locklift.keystore.getSigner("0"))!;

  const { contract: sample } = await locklift.deployArtifacts.deployContract(
    "SampleA",
    "latest",
    {
      contract: "Sample",
      publicKey: signer.publicKey,
      initParams: { _nonce: locklift.utils.getRandomNonce() },
      constructorParams: { _state: 0 },
      value: locklift.utils.toNano(1),
    },
    locklift.privateRPC.deployContract, // specify deploy function here
  );

  console.log("sample contract address:", sample.address.toString());
}

main()
  .then(() => process.exit(0))
  .catch(e => {
    console.log(e);
    process.exit(1);
  });