Catalog npm
Back to packageRELEASE DETAILS

0.0.0-20240704152116

npm

@0xsequence/deployer

deployer sub-package for Sequence

Published4 Jul 2024
Direct dependencies9
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 12

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@0xsequence/utils
Environment
{
  "local_name": "@0xsequence/utils",
  "alias": false,
  "peer_metadata": null
}
0.0.0-20240704152116runtime
dotenv
Environment
{
  "local_name": "dotenv",
  "alias": false,
  "peer_metadata": null
}
^16.0.3development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
^5.7.2development
typechain
Environment
{
  "local_name": "typechain",
  "alias": false,
  "peer_metadata": null
}
^8.1.1development
@ethersproject/abi
Environment
{
  "local_name": "@ethersproject/abi",
  "alias": false,
  "peer_metadata": null
}
^5.7.0development
@typechain/ethers-v5
Environment
{
  "local_name": "@typechain/ethers-v5",
  "alias": false,
  "peer_metadata": null
}
^10.1.1development
@nomiclabs/hardhat-web3
Environment
{
  "local_name": "@nomiclabs/hardhat-web3",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
@ethersproject/providers
Environment
{
  "local_name": "@ethersproject/providers",
  "alias": false,
  "peer_metadata": null
}
^5.7.2development
@nomiclabs/hardhat-ethers
Environment
{
  "local_name": "@nomiclabs/hardhat-ethers",
  "alias": false,
  "peer_metadata": null
}
^2.2.1development
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
>=5.5 < 6peer
@ethersproject/abi
Environment
{
  "local_name": "@ethersproject/abi",
  "alias": false,
  "peer_metadata": null
}
>= 5.5peer
@ethersproject/providers
Environment
{
  "local_name": "@ethersproject/providers",
  "alias": false,
  "peer_metadata": null
}
>= 5.5peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "fe19de83f2486b5830215b44e0eb1035733ccee0",
  "tarball": "https://registry.npmjs.org/@0xsequence/deployer/-/deployer-0.0.0-20240704152116.tgz",
  "fileCount": 25,
  "integrity": "sha512-O/VIpjZPjq2vzUXXruqL8yPalFhZnk1AlcfYZEjj+FgpYDIh54n5KCfg81BtAZ18SnD6bC7LfuhjpOhTbloj5Q==",
  "signatures": [
    {
      "sig": "MEUCIDYHTOYSSgDLOl9dECJPU59p8kWoI21fM8czmKiceO0bAiEArbrczemdDlk+ZDUBM6zBa261SdNS59nvAxJWzJ+A+vw=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 86243
}

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:ffdc1ec0089d3cbd09ee497ca19467fc554dfac14edc4d52dd3f82febedae1df

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 →