Catalog npm
Back to packageRELEASE DETAILS

0.0.0-20240321190537

npm

@0xsequence/deployer

deployer sub-package for Sequence

Published21 Mar 2024
Direct dependencies4
Transitive dependenciesNot calculated

README

Current package documentation

@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

  1. yarn add @0xsequence/deployer
  2. Import UniversalDeployer into script
  3. Create UniversalDeployer instance
  4. 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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0xsequence/utils
Environment
{
  "local_name": "@0xsequence/utils",
  "alias": false,
  "peer_metadata": null
}
0.0.0-20240321190537runtime
dotenv
Environment
{
  "local_name": "dotenv",
  "alias": false,
  "peer_metadata": null
}
^16.0.3development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
github:corbanbrook/ethers.jsdevelopment
typechain
Environment
{
  "local_name": "typechain",
  "alias": false,
  "peer_metadata": null
}
^8.1.1development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
corbanbrook/ethers.jspeer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "126aec454f27d911096d437a4ebf50be7a36e1bb",
  "tarball": "https://registry.npmjs.org/@0xsequence/deployer/-/deployer-0.0.0-20240321190537.tgz",
  "fileCount": 25,
  "integrity": "sha512-O5fkuFdFeSVceXJrteqtoVG4+blYKPm8ttWYMbgWHq/CMdPRUa2DHkxkA8lka6Q+/89qUoPKrcE9aZoR5PuX9w==",
  "signatures": [
    {
      "sig": "MEUCIAIOk4VABDwEY5pHm8KfnR2amcTJ9yu1YSKJW4w3YvrGAiEA2pjTzPbF/KYPwwk996NCv49LKgojbM+LQaPiLtqyBaE=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 90322
}

Repository

PENDING
0xsequence/sequence.js

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:13 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:b416476e84b2bf8cbfd3eb144df81e472e2b6e7f8b9cc9ba01d6a0cee6c10141

Other collected versions

2.3.472 Oct2.3.4618 Sept2.3.4517 Sept2.3.442 Jun2.3.4324 Mar2.3.4223 MarView all collected versions →