Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
0xWeb
- Contract package manager and CLI Web3 Toolkit
Generate TypeScript classes for contracts fetched from Etherscan and Co.
We use 📦 dequanto library for the wrapped classes
Here the example of generated classes: 0xweb-org/0xweb-sample 🔗
$ 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
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';
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));
READ and WRITE to installed contracts directly from the command line
$ 0xweb contract chainlink/oracle-eth latestAnswer
❗❣️❗ 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
Get the commands overview
$ 0xweb --help
$ 0xweb install --help
block
$ web3 block get latest
token
$ 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 to create cryptographically strong secrets 🔑 for 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.
FAQs
Contract package manager and other web3 tools
The npm package 0xweb receives a total of 1,275 weekly downloads. As such, 0xweb popularity was classified as popular.
We found that 0xweb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.