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

evm-run

v0.1.1

Published

Run evm code from console or from file, on local env or mainnet fork.

Downloads

11

Readme

evm-run

Run evm code from console or from file, on local env or mainnet fork.

Setup

npm i -g evm-run

Usage

Run code directly

Calculates square

$ evm-run --code 348002600052596000f3 --value 3
34 CALLVALUE
80 DUP1      Stack: 3
2 MUL        Stack: 3,3
60 PUSH1     Stack: 9
52 MSTORE    Stack: 0,9
59 MSIZE                Memory: 0000000000000000000000000000000000000000000000000000000000000009
60 PUSH1     Stack: 20  Memory: 0000000000000000000000000000000000000000000000000000000000000009
f3 RETURN    Stack: 0,20 Memory: 0000000000000000000000000000000000000000000000000000000000000009
Returned: 0000000000000000000000000000000000000000000000000000000000000009
gasUsed : 24

Run pseudo code

$ evm-run --code 'push1 2 push1 3 add stop'
code 600260030100
60 PUSH1
60 PUSH1 Stack: 2
1 ADD    Stack: 3,2
0 STOP   Stack: 5
Returned:
gasUsed : 9

Mainnet fork

Run evm code against mainnet fork, to get balance of vitalik.

% evm-run 363d600C373d51313d52593df3 --data d8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --rpc https://eth-mainnet.alchemyapi.io/v2/<API-KEY> --forkBlockNumber 14379250
36 CALLDATASIZE
3d RETURNDATASIZE Stack: 14
60 PUSH1          Stack: 0,14
37 CALLDATACOPY   Stack: C,0,14
3d RETURNDATASIZE               Memory: 000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
51 MLOAD          Stack: 0      Memory: 000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
31 BALANCE        Stack: D8DA6BF26964AF9D7EED9E03E53415D37AA96045 Memory: 000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
3d RETURNDATASIZE Stack: E034B8C125409C0113                       Memory: 000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
52 MSTORE         Stack: 0,E034B8C125409C0113                     Memory: 000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045
59 MSIZE                                                          Memory: 0000000000000000000000000000000000000000000000e034b8c125409c0113
3d RETURNDATASIZE Stack: 20                                       Memory: 0000000000000000000000000000000000000000000000e034b8c125409c0113
f3 RETURN         Stack: 0,20                                     Memory: 0000000000000000000000000000000000000000000000e034b8c125409c0113
Returned: 0000000000000000000000000000000000000000000000e034b8c125409c0113
gasUsed : 2630