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

@tokamak-network/deploy-v3

v1.0.4

Published

Deploy Uniswap V3 smart contracts

Downloads

32

Readme

Deploy Uniswap V3 Script

This package includes a CLI script for deploying the latest Uniswap V3 smart contracts to any EVM (Ethereum Virtual Machine) compatible network.

Usage

This package vends a CLI for executing a deployment script that results in a full deployment of Uniswap Protocol v3. Get the arguments for running the latest version of the script via npx @tokamak-network/deploy-v3 --help.

As of v1.0.3 the arguments are:

> npx @tokamak-network/deploy-v3  --help
Usage: npx @tokamak-network/deploy-v3  [options]

Options:
  -pk, --private-key <string>               Private key used to deploy all contracts
  -j, --json-rpc <url>                      JSON RPC URL where the program should be deployed
  -ncl, --native-currency-label <string>    Native currency label, e.g. ETH
  -o, --owner-address <address>             Contract address that will own the deployed artifacts after the script runs
  -s, --state <path>                        Path to the JSON file containing the migrations state (optional) (default: "./state.json")
  -g, --gas-price <number>                  The gas price to pay in GWEI for each transaction (optional)
  -c, --confirmations <number>              How many confirmations to wait for after each transaction (optional) (default: "2")
  -V, --version                             output the version number
  -h, --help                                display help for command

The script runs a set of migrations, each migration deploying a contract or executing a transaction. Migration state is saved in a JSON file at the supplied path (by default ./state.json).

To use the script, you must fund an address, and pass the private key of that address to the script so that it can construct and broadcast the deployment transactions.

The block explorer verification process (e.g. Etherscan) is specific to the network. For the existing deployments, we have used the @nomiclabs/hardhat-etherscan hardhat plugin in the individual repositories to verify the deployment addresses.

Note that in between deployment steps, the script waits for confirmations. By default, this is set to 2. If the network only mines blocks when the transactions is queued (e.g. a local testnet), you must set confirmations to 0.

Development

To run unit tests, run yarn test.

For testing the script, run yarn start.

To publish the script, first create a version: npm version <version identifier>, then publish via npm publish. Don't forget to push your tagged commit!

FAQs

How much gas should I expect to use for full completion?

We estimate 30M - 40M gas needed to run the full deploy script.

When I run the script, it says "Contract was already deployed..."

Delete state.json before a fresh deploy. state.json tracks which steps have already occurred. If there are any entries, the deploy script will attempt to pick up from the last step in state.json.

Where can I see all the addresses where each contract is deployed?

Check out state.json. It'll show you the final deployed addresses.

How long will the script take?

Depends on the confirmation times and gas parameter. The deploy script sends up to a total of 14 transactions.

Where should I ask questions or report issues?

You can file them in issues on this repo and we'll try our best to respond.