Socket
Book a DemoInstallSign in
Socket

ethy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethy

Tiny command line utils for ethereum development and learning

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Ethy

npm npm bundle size

A tiny command line utility for learning and developing on Ethereum.

Implemented as a commanderJS wrapper around the ethersJS, where possible it uses the same function signatures.

Installation

The most convenient way is to install the package globally, that you can run ethy <command> from any directory.

npm i -g ethy

Examples

View all available commands

ethy --help

Commands:
  getBalance [options] <addressOrName>  get the balance of an account
  lookupAddress [options] <address>     lookup the ENS name associated with an address
  resolveName [options] <name>          lookup the address associated with an ENS name
  getGasPrice [options]                 returns current estimated gas price
  convertWei <amount>                   returns input amount in wei, gwei and eth
  keccak256 <input>                     returns the KECCAK256 hash of the text bytes
  help [command]                        display help for command

Get Balance

Get the eth balance of an address or ENS name.

$ ethy getBalance vitalik.eth

3207.586970447020180416 eth

You can optionally specify network to target testnets.

$ ethy getBalance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --network rinkeby

0.410338958929449048 eth

ENS Lookup and Resolution

Another common operation is resolving ENS names in both directions

$ ethy resolveName vitalik.eth

0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
$ ethy lookupAddress 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045

vitalik.eth

Get current gas price

$ ethy getGasPrice

27.872450494 gwei

Convert Wei

Much quicker than googling wei to eth converter five times a day

$ ethy convertWei 100000000000

100.0 gwei
0.0000001 eth

Convert Wei

Check the keccak256 hash value of a string

$ ethy keccak256 "hello world"

0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad

Keywords

ethereum

FAQs

Package last updated on 25 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.