Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@0xsequence/deployer

Package Overview
Dependencies
Maintainers
5
Versions
554
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/deployer

deployer sub-package for Sequence

latest
Source
npmnpm
Version
2.3.31
Version published
Weekly downloads
650
34.02%
Maintainers
5
Weekly downloads
 
Created
Source

@0xsequence/deployer

Deploy contracts using a universal deployer via CREATE2, allowing contracts to have the same address on any EVM chain.

UniversalDeployer works in both Web Browsers and Nodejs.

For more info, see 0xsequence project page.

How to use

  • yarn add @0xsequence/deployer
  • Import UniversalDeployer into script
  • Create UniversalDeployer instance
  • Deploy contracts

An instance number can be passed if multiple instance of the same contract need to be deployed on the same chain. The default instance number is 0, if none is passed.

...
import { UniversalDeployer } from '@0xsequence/deployer'

const provider = new Web3Provider(web3.currentProvider)
const universalDeployer = new UniversalDeployer(network.name, provider)

const main = async () => {
  await universalDeployer.deploy('Factory', FactoryFactory)
  await universalDeployer.deploy('MainModuleUpgradable', MainModuleUpgradableFactory)
  await universalDeployer.deploy('GuestModule', GuestModuleFactory)

  prompt.start(`writing deployment information to ${network.name}.json`)
  await universalDeployer.registerDeployment()

  // or, await universalDeployer.getDeployment()

  prompt.succeed()
}

main()

You can also pass transaction parameters explicitly :

...

const main = async () => {
  await universalDeployer.deploy('WalletFactory', FactoryFactory, { gasLimit: 1000000 })
  await universalDeployer.deploy('MainModuleUpgradable', MainModuleUpgradableFactory, { gasPrice: 10n ** 9n })
}

License

License: MIT

Copyright (c) 2018-present Horizon Blockchain Games Inc.

FAQs

Package last updated on 16 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts