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 🙏

© 2024 – Pkg Stats / Ryan Hefner

brainchrusher-package-number-uno

v0.0.1

Published

TODO

Downloads

5

Readme

ChainSafe's Hardhat Plugin for Multichain Deployment with Sygma

Unlock the full potential of Hardhat with Sygma: the premier plugin for effortlessly deploying your Ethereum smart contracts across multiple blockchain networks. Leveraging the Sygma protocol, this tool revolutionizes your deployment process, making it efficient, streamlined, and truly multi-chain. With ChainSafe's plugin, you're not just deploying contracts—you're exploring new possibilities within the blockchain ecosystem.

Installation

To install, run:

npm install --save-dev @chainsafe/hardhat-plugin-multichain-deploy @buildwithsygma/sygma-sdk-core

Importing the Plugin

For JavaScript users, add this line to your hardhat.config.js:

require("@chainsafe/hardhat-plugin-multichain-deploy");

For TypeScript users, include it in your hardhat.config.ts:

import "@chainsafe/hardhat-plugin-multichain-deploy";

Environment Extensions

The plugin adds a multichain namespace to the Hardhat Runtime Environment (HRE), introducing new methods for deployment:

async deployMultichain<Abi extends ContractAbi = any>(
    contractName: string,
    networkArgs: NetworkArguments<Abi>,
    options?: DeployOptions
): Promise<{
   deploymentInfo: DeploymentInfo[];
   receipt: Transaction;
} | void>

async deployMultichainBytecode<Abi extends ContractAbi = any>(
    contractBytecode: string,
    contractAbi: Abi,
    networkArgs: NetworkArguments<Abi>,
    options?: DeployOptions
): Promise<{
   deploymentInfo: DeploymentInfo[];
   receipt: Transaction;
} | void>
  • contractName: Name of the contract for deployment.
  • contractBytecode: Compiled bytecode of the contract.
  • contractAbi: Contract ABI, detailing methods and structures for interaction.
  • networkArgs: Maps network identifiers to deployment arguments. Refer to NetworkArguments.md for more.
  • options: Optional deployment settings. Details in DeployOptions.md.

Environment Variable

  • ADAPTER_ADDRESS: Address of the adapter, facilitating deployment across chains with Sygma. Use this if deploying custom adapters.

Configuration

To utilize the Multichain Deployment plugin, specific settings are required:

  • multichain namespace: Configures deployment settings.
    • environment: Defines the Sygma environment. Use Environment from @buildwithsygma/sygma-sdk-core for constants.

Example Configuration

import { Environment } from "@buildwithsygma/sygma-sdk-core";

const config: HardhatUserConfig = {
    // Other configurations...
    defaultNetwork: "goerli",
    networks: {
        sepolia: { ... },
        goerli: { ... },
        optimisticGoerli: { ... },
    },
    multichain: {
        environment: Environment.TESTNET,
    },
};

Usage

With the setup complete, let’s deploy an ERC20 contract across multiple chains:

const networkArgs = {
   sepolia: {
     args: [name, symbol, decimals],
   },
   goerli: {
      args: [name, symbol, decimals],
   },
};
const options = {
   salt: "0xcafe00000000000000000000000000000000000000000000000000000000cafe",
};

this.hre.multichain.deployMultichain("MySuperToken", networkArgs, options);

Contribution

To contribute to this project, please see the monorepo readme for guidelines.