Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chain-pal

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

chain-pal

ChainPal is a handy CLI tool for developers working with EVM-like chains. It provides various useful utilities for conversion, address verification, gas estimation, processing transaction data from CSV files, and more.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ChainPal

ChainPal is a handy CLI tool for developers working with EVM-like chains. It provides various useful utilities for conversion, address verification, gas estimation, processing transaction data from CSV files, and more.

Installation

To install ChainPal, run the following command:

npm install -g chain-pal

ChainPal provides several commands to work with blockchain data:

Convert a value between hex and decimal and vice versa.

chain-pal convert <value>
  • value: The value in hex or decimal format to be converted.

Convert a value in wei to gwei and ether, considering token decimals

chain-pal convert-unit-wei <value> <decimals>
  • value: The value in wei to be converted.
  • decimals: The number of decimals for the token (default: 18).

Convert a value in gwei to wei and ether, considering token decimals

chain-pal convert-unit-gwei <value> <decimals>
  • value: The value in gwei to be converted.
  • decimals: The number of decimals for the token (default: 18).

Convert a value in ether to wei and gwei, considering token decimals

chain-pal convert-unit-ether <value> <decimals>
  • value: The value in ether to be converted.
  • decimals: The number of decimals for the token (default: 18).

Process a CSV file containing transactions and output the transaction details,

considering the gas price and gas limit for EVM-like chains

chain-pal process-csv <httpEndpoint> <csvFilePath>
  • httpEndpoint: The HTTP endpoint for the JSON-RPC provider. It can be https://ethereum.publicnode.com

  • csvFilePath: The file path of the CSV to be processed.

  • must have the following format:

    amountWeifromto
    100000000000000000000x71508f88e558b414f8a65b3b56362bfb7a9652b80xed1052b6017745d1fab9f0a0b10bc81bba6b5068

Checks if an address is a smart contract or not.

chain-pal is-contract <httpEndpoint> <address>

httpEndpoint: The HTTP endpoint for the JSON-RPC provider. It can be https://ethereum.publicnode.com

  • address: The address to be checked.

Verify the validity of an EVM address.

chain-pal is-valid <address>
  • address: The address to verify.

Estimates gas given from, to, and value.

chain-pal estimate-gas <httpEndpoint> <from> <to> <value>
  • httpEndpoint: The HTTP endpoint for the JSON-RPC provider. It can be https://ethereum.publicnode.com
  • from: The source address.
  • to: The target address.
  • value: The transaction value.

Encode a function signature based on the input

chain-pal encode-signature <signature>
  • signature: Keccak256 function to be encoded. e.g approve(address,uint256)

Keywords

FAQs

Package last updated on 14 Apr 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc