
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
@0x/0x-parser
Advanced tools
๐งพ Designed for 0x integrators: This library parses 0x transactions on EVM blockchains into a format that is both user-friendly and easy to understand.
![]() Arbitrum |
![]() Avalanche |
![]() Base |
![]() BNB Chain |
![]() Blast |
![]() Ethereum |
![]() Linea |
![]() Mantle |
![]() Optimism |
![]() Polygon |
![]() Scroll |
![]() Mode |
![]() Worldchain |
![]() Unichain |
Berachain |
![]() ๐ |
![]() ๐ |
![]() ๐ |
This library is designed for 0x integrators, simplifying the complex task of parsing 0x transactions into a format that is both user-friendly and easy to understand. When swapping tokens, one of the challenges is that the trade can experience slippage through Automated Market Makers (AMMs). This makes the final swap amounts difficult to predict prior to executing the trade. However, this library overcomes that challenge by parsing the transaction receipt and event logs to accurately identify the final swap amounts.
Try out the parser in a live code environment directly in your browser ๐. You can also experience it in action through the demo UI app, which is built with 0x-parser.
0x-parser relies on the debug_traceTransaction
Ethereum JSON-RPC method to parse 0x transactions. Ensure that your RPC node supports this method.
First, make sure you have the required peer dependency viem installed. If you haven't installed it yet, you can do so with the following command:
npm install viem
After installing the peer dependency, proceed to install the @0x/0x-parser package:
npm install @0x/0x-parser
import { parseSwap } from "@0x/0x-parser";
import { createPublicClient } from "viem";
import { http } from "viem";
import { mainnet } from "viem/chains";
async function main() {
const RPC_URL = `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`;
// You can pass any transaction hash that you got after submitted a 0x transaction:
// https://etherscan.io/address/0x2fc205711fc933ef6e5bcc0bf6e6a9bfc220b2d8073aea4f41305882f485669d
const transactionHash = `0x2fc205711fc933ef6e5bcc0bf6e6a9bfc220b2d8073aea4f41305882f485669d`;
const publicClient = createPublicClient({
chain: mainnet,
transport: http(RPC_URL),
});
const swap = await parseSwap({ publicClient, transactionHash });
console.log(swap); // Logs the swap details.
}
main();
This repository contains example code that you can run locally, which is useful for the development process. The code can be found in /examples/web/index.html
and you can run the code by running npm run web:example
.
Contributions are always welcomed! Please read the contributing guidelines before submitting a pull request.
FAQs
๐งพ Designed for 0x integrators: This library parses 0x transactions on EVM blockchains into a format that is both user-friendly and easy to understand.
The npm package @0x/0x-parser receives a total of 170 weekly downloads. As such, @0x/0x-parser popularity was classified as not popular.
We found that @0x/0x-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.ย It has 7 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.