Catalog npm
Back to packageRELEASE DETAILS

0.0.0-20240613194955

npm

@0xsequence/deployer

deployer sub-package for Sequence

Published13 Jun 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-20240613194955runtime
dotenv
Environment
{
  "local_name": "dotenv",
  "alias": false,
  "peer_metadata": null
}
^16.0.3development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
^6.13.0development
typechain
Environment
{
  "local_name": "typechain",
  "alias": false,
  "peer_metadata": null
}
^8.1.1development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
>=6peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "cbf10e4729e3c14958db69ade2c71bea1e544d21",
  "tarball": "https://registry.npmjs.org/@0xsequence/deployer/-/deployer-0.0.0-20240613194955.tgz",
  "fileCount": 25,
  "integrity": "sha512-oO/C00qBY104ZZ4G9Eb1YsCTV0iVlM0HfiKgxtDv8FdEFgXiZvj/5dFxSj7B6k3WqOuZfd6tLlFyKmltGiZscw==",
  "signatures": [
    {
      "sig": "MEYCIQDJ7YsmZmV9FWGKpLUkHb/dkU0vRJirFFbkxAJPKJ8h9AIhAMGcJmbyOqsVZ/IcZ8OQ3EGPWI6O9b1TvFsPZ31KQ5CM",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 89616
}

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:14 UTC

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

Record identity

package_version:774d7726307aefadfd9d8cb3d2ad6071409276fabc7bb9bbdb3dc10667c406d1

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 →