Catalog npm
PACKAGE EXPLORERView in registry

0xweb

npm

Contract package manager and other web3 tools

auto-generationclicli walletcontractsevmweb3
Versions collected167
Direct dependencies38From release 0.11.11
Last observed20 Oct, 17:54 UTC

README

Current package documentation

0xweb - Contract package manager and CLI Web3 Toolkit


Website Link Documentation Link NPM version CircleCI

  • Generate TypeScript or ES6 classes for contracts fetched from Etherscan and Co.
  • CLI commands to query the contracts or to submit transactions
  • RESTful API for the installed contracts
  • Deploy and track deployed contracts with ease

Dequanto library 📦 is used for the wrapped classes

Here the example of generated classes: 0xweb-org/0xweb-sample 🔗

Install

$ npm i 0xweb -g

# Boostrap dequanto library in cwd
$ 0xweb init

# Download sources/ABI and generate TS classes
$ 0xweb install 0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419 --name chainlink/oracle-eth

Use the --hardhat flag, if you want to develop|compile|deploy|test contracts: 0xweb init --hardhat

API Usage

Use autogenerated TypeScript classes for much safer and faster backend implementation

import { ChainlinkOracleEth } from '0xc/eth/chainlink/oracle-eth/oracle-eth';
import { Config } from 'dequanto/config/Config';
import { $bigint } from 'dequanto/utils/$bigint';

await Config.fetch();

let oracle = new ChainlinkOracleEth();
let decimals = await oracle.decimals();
let price = await oracle.latestAnswer();

console.log(`ETH Price`, $bigint.toEther(price, decimals));

CLI Usage

READ and WRITE to installed contracts directly from the command line

$ 0xweb contract chainlink/oracle-eth latestAnswer

WEB Usage

The package has the built-in web interface to make the blockchain analyze and interaction simpler.

  1. If you initialize the Transaction via CMD, you may want to sign the transaction with your browser wallet. For this, 0xweb spins up the HTTP server and redirects your browser to visit local page where the details of the transaction being shown, and you can sign and submit the transaction.

  2. Launch local server to view the validated contract in UI interface to interact with.

0xweb server start

Config

❗❣️❗ We include our default KEYs for etherscan/co and infura. They are rate-limited. Please, create and insert your keys. Thank you!

$ 0xweb config --edit

## optionally, you can provide the Nodes Endpoint with `--endpoint` flag
$ 0xweb COMMAND --endpoint https://my-node-url-here

Commands overview 🔗

Various Blockchain tools

Get the commands overview

$ 0xweb --help
$ 0xweb install --help

block

  1. Get current block info
$ 0xweb block get latest

token

  1. Get Token Price
$ 0xweb token price WETH

accounts

🔐 Wallet feature allows to store accounts in encrypted local storage. We use local machine KEY and provided PIN in arguments or environment to create cryptographically strong secrets 🔑 for account encryption.

When calling contracts WRITE methods, you should first add an account to the wallet, and then use PIN to unlock the storage

$ 0xweb account add --name foo --key the_private_key --pin foobar
$ 0xweb token transfer USDC --from foo --to 0x123456 --amount 20 --pin foobar

🏁


©️ MIT License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 167

Collected releases
VersionPublishedDirect dependenciesOpen version
0.11.11Registry latest2 Oct 202638
0.11.1017 Jun 202638
0.11.99 Apr 202638
0.11.83 Mar 202638
0.11.725 Feb 202638
0.11.222 Oct 202538
0.11.124 Sept 202538
0.11.014 Sept 202538
0.10.988 Aug 202538
0.10.9521 Jan 202536
0.10.933 Jan 202528
0.10.9130 Dec 202428
0.10.9027 Dec 202428
0.10.8927 Dec 202428
0.10.8725 Dec 202428
0.10.8624 Dec 202428
0.10.8523 Dec 202428
0.10.8423 Dec 202428
0.10.8319 Dec 202427
0.10.8219 Dec 202427

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
tenbits/0xweb

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xweb-org/0xweb

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:54 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:4ac4b8c42e982a886e85933bac3beac9aa60aa07a66c34d0915f74878c6e2bd6