Catalog npm
Back to packageRELEASE DETAILS

0.11.1

npm

@0xsequence/deployer

deployer sub-package for Sequence

Published23 Mar 2021
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 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
ora
Environment
{
  "local_name": "ora",
  "alias": false,
  "peer_metadata": null
}
^5.2.0runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
^5.0.32runtime
@0xsequence/utils
Environment
{
  "local_name": "@0xsequence/utils",
  "alias": false,
  "peer_metadata": null
}
^0.11.1runtime
@ethersproject/contracts
Environment
{
  "local_name": "@ethersproject/contracts",
  "alias": false,
  "peer_metadata": null
}
^5.0.12runtime
dotenv
Environment
{
  "local_name": "dotenv",
  "alias": false,
  "peer_metadata": null
}
^8.2.0development
typechain
Environment
{
  "local_name": "typechain",
  "alias": false,
  "peer_metadata": null
}
^4.0.3development
@typechain/ethers-v5
Environment
{
  "local_name": "@typechain/ethers-v5",
  "alias": false,
  "peer_metadata": null
}
^6.0.2development
@nomiclabs/hardhat-web3
Environment
{
  "local_name": "@nomiclabs/hardhat-web3",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
@nomiclabs/hardhat-ethers
Environment
{
  "local_name": "@nomiclabs/hardhat-ethers",
  "alias": false,
  "peer_metadata": null
}
^2.0.2development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "1ebb3a7576c4340aee138c336ffdf5dbbe081bba",
  "tarball": "https://registry.npmjs.org/@0xsequence/deployer/-/deployer-0.11.1.tgz",
  "fileCount": 29,
  "integrity": "sha512-ptmugS+7nq0Sx0h3xSNrgPz4M21DW/dmYzEwAhNt+fB/ofDO0IRPdHvzRFVgwAmlKQgSawDoGHONNMVT2fE40w==",
  "signatures": [
    {
      "sig": "MEQCICLpM0gyyd2anVCpG5OBBDJNTT5DuBYvtJO9j81OxhoNAiACzrH7tYhkpJ40CQ/Hu2cHV0L7vomqqdYXoyxuMclGbQ==",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 74754,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWb9fCRA9TVsSAnZWagAAYXIP/itpWam7mHONYI4m65q/\nS94FQeHKBVNQ/6TUCQOoWApzCEPum75HUv/L9r0j08S5UMDcMMcUNCdUDXQ/\n7k+9kYFtkKrP6IuvtnQyyzH/DkszqS3p0jOqe6wAu18bi+g4/heoxojwTGI1\nL2DEWC6FIuXn10AS8k1KFqerRxj9F7z4lZ7IhWWWlY55qSePYCPlAfvnmeEH\n/AbofztWuJ+yIBAJ+geAsy5ttspg9pmS5rLRx1qbUeN4u1Q3IPC0AFLPWC4F\n366/IRu8wbS4OCnCxSc33EtygUlZuCK/i/UxFlKaz0jORUrxV6xSdZFSHGwg\nscYanlYolw3T2f7qcndFKVTTCYvtFnGR0Oxzzvm9kz/8cMTbwW/KeIxKr+K/\netSt9QfFM7V1ZM4R3qDXb5e7bN5mxpmjKcahhTHmi2tYqFSwafvGoowzsIzi\n0wD7E6HxktrIDh3SaxgPw4OVyejS3tKOCTfL8fucMaW4JGQhPc0VvnSS/Psx\nDgQyhPCCrc17cBp3NsCqMOwU81f0++mb/gcb33l7EHohA5WJaDUwsHTDa6u8\n2+FxgZLl3NyT8rjdE7se8+f2tomHA+IoA1lgjyfz37Gjj5Spg7fuzgfvec/Q\nMPEFkTPAxSvN/nt/Sab7QIi/7kjN5xByI7dkbe87DyzSweQbKuRFn5G55+w1\nQIkH\r\n=+LVd\r\n-----END PGP SIGNATURE-----\r\n"
}

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

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

Record identity

package_version:c04793602a319a677bca9845a98b47b86f4458e4df7affd1102d4e4e263c8a97

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 →