开发者社区> 镜像站> NPM> eth-create2
eth-create2
Generate Ethereum CREATE2 addresses
Last updated 4 months ago by emilbayes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eth-create2 
SYNC missed versions from official npm registry.

eth-create2

Build Status

Generate Ethereum CREATE2 addresses

Usage

const create2 = require('eth-create2')

// From EIP test vectors
const creatorAddress = '0xdeadbeef00000000000000000000000000000000'
const salt = '0x0000000000000000000000000000000000000000000000000000000000000000'
const initCode = '0x00'

const address = create2(creatorAddress, salt, initCode)

// address === '0xb928f69bb1d91cd65274e3c79d8986362984fda3'

API

const resultAddress = create2(address, salt, initCode)

Generate Ethereum CREATE2 address. Arguments can either be in the usual Ethereum hex encoded string form or Buffers. Note that address is the address of the contract executing the create2 instruction. Returns resultAddress as hex encoded string. Not checksum'ed, but this can be done with eth-checksum or similar modules.

Install

npm install eth-create2

License

ISC

Current Tags

  • 1.0.1                                ...           latest (4 months ago)

2 Versions

  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None