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

@wandevs/bytecode-verifier

v0.4.3

Published

The purpose of this tool is to verify that the Contract Source on wanchain matches the bytecode that's actually on the blockchain. If the code does not match the blockchain, the tool will display a warning message.

Downloads

11

Readme

[ 🌐 📩 🔥 ]

Bytecode Verifier

Bytecode Verifier is a handy commandline tool for verifying locally compiled bytecode of a target Solidity contract against its actual bytecode stored in Wanchain Blockchain provided its contract address. This tool:

  • integrity/correctness of bytecode: what's actually being stored on chain is correctly compiled from particular contract, which might be helpful in case of non-trivial potential high-value holder contract deployment(e.g. MultiSig Wallet), especially the contract is deployed through a third party platform.
  • Minimimal effort, simple to use: solidity compiler envolves overtime with minor and some major changes, which complicates the verification of bytecode. (as recurring "bytecode doesn't match" questions being asked on Wanchain Stack Exchange). Bytecode Verifier has been tested against latest version all the way back to some of the oldest deployed contracts.
  • Testnet friendly: most projects launch on testnet before deploying the contract system to mainnet, this tool supports Rinkeby, Kovan and Ropsten Testnet, which constitute three active, well-maintained testnets that most ethereum developers use.

Installation

Prefer global install:

npm install @wandevs/bytecode-verifier -g

If successfully installed, try the -h or --help to read a brief info about this tool.

wanv --help

ethv_help

Quick Usage

wanv verify <chainChoice>

! Currently this tool can verify contracts on: mainnet, kovan, ropsten and rinkeby (NOTE: for contracts on Rinkeby, only compiler version no earlier than 0.4.9)!

  1. Save the contract code into a file with name *YourContractName*.sol. If your contract imports other contract in a separate file or it consists of multiple contracts, please do name the file as the main contract since that's what's the bytecode we tend to verify.(e.g. contract StandardToken is Token {}, then StandardToken.sol should be the file name.)

  2. The wanv verifier will prompt 4 questions. Among which, be careful about the format of compiler version specification. If you are not sure, try run wanv compiler first, and copy the legitimate version string from the output.

  3. If bytecode of your local file checks out with what's actually on the blockchain address, then terminal will return positive feedback, otherwise red bold alert feedback will be returned.

Example1: Golem_MultiSigWallet (mainnet)

golem_multisig

Example2: Oraclize (kovan)

oraclize_kovan

For more example: please go to example subfolder

wanv --list

To quickly get a list of formal major release version of solidity compiler.

ethv_list

wanv compiler

To look up for an intermediate "nightly" version of solidity compiler

ethv_compiler

Contributing

This bytecode verifier is entirely open sourced, anyone in the community is free to use in any purpose. (see MIT License for details) More importantly, any issues or pull request are more than welcomed. According npm package can be found here.

Acknowledgement

Big thanks and great gratitude to ConsenSys Diligence for making this project possible.