npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hybridx-exchange/erc2470

v0.0.1

Published

ERC2470 - Singleton Factory

Downloads

8

Readme

ERC2470 Singleton Factory Contract

Proposal

The official proposal can be found at: eips.ethereum.org/EIPS/eip-2470.

ERC2470 Factory

This repository contains the official implementation of the ERC2470 factory as defined in the standard.

The address of the factory on all chains is:

Vanity Generator for ERC2470 Singletons

Run the following to generate a few vanity "0x1234" addresses of "SingletonExample.sol":

npm run build
node ./scripts/vanitygen-erc2470.js "0x1234"

The script simply try salts for the bytecode of that example.

Compilation & Verification

:warning: The solc compiler version 0.5.11+commit.22be8592 must be present on the build machine. (More info on installing solc.)

The factory can be compiled from the source code using:

npm run build

This will write the json artifacts for the factory in the artifacts folder and the standard output in the build folder.

Verification

The address of the account creating the factory, the address of the factory and the raw signed transaction can be generated with:

$ npm run info
> node js/info.js

RawTx:  0xf9016c8085174876e8008303c4d88080b90154608060405234801561001057600080fd5b50610134806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634af63f0214602d575b600080fd5b60cf60048036036040811015604157600080fd5b810190602081018135640100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925060eb915050565b604080516001600160a01b039092168252519081900360200190f35b6000818351602085016000f5939250505056fea26469706673582212206b44f8a82cb6b156bfcc3dc6aadd6df4eefd204bc928a4397fd15dacf6d5320564736f6c634300060200331b83247000822470
Sender:  0xBb6e024b9cFFACB947A71991E386681B1Cd1477D
Contract: 0xce0042B868300000d44A59004Da54A005ffdcf9f

Those values can be compared with the values in the ERC2470 standard.

Metadata

The metadata---for the factory only---can be extrated using:

node scripts/extract_metadata.js

This metadata can also be compared with the formated version in the ERC2470 standard.

Vanity address

The vanity address of the factory---starting with 0x2470---has been generated using the scripts/vanitygen.sh and scripts/vanitygen-info.js scripts.

Authors

License

The ERC2470 factory is part of the ERC2470 standard and is therefore in the public domain via CC0.

The authors waive all copyright and related or neighboring rights for the rest of this repository's content via CC0. A copy of the CC0 waiver is included in the LICENSE file.