![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@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 | Celo | Ethereum | Fantom | Optimism | Polygon |
This library is designed for 0x integrators, and it simplifies the complex task of parsing 0x transactions into a format that is both user-friendly and easy to understand. One of the challenges when swapping tokens is that the trade can experience slippage through Automated Market Makers (AMMs), making 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 the demo here.
npm install @0x/0x-parser
import { parseSwap } from "@0x/0x-parser";
async function main() {
const response = await fetch(
"https://raw.githubusercontent.com/0xProject/protocol/development/packages/contract-artifacts/artifacts/IZeroEx.json"
);
const IZeroEx = await response.json();
const data = await parseSwap({
rpcUrl: "https://eth.llamarpc.com",
exchangeProxyAbi: IZeroEx.compilerOutput.abi,
transactionHash: "0xd8637124d650268ae7680781809800e103a3a2bee9fec56083028fea6d98140b",
});
console.log(data);
}
main();
This package directly integrates the latest version of Ethers.js, a decision driven by the rapid and often inconsistent upgrade patterns observed in some web3 codebases. This decision simplifies the source code by eliminating the need to support multiple versions of Ethers.js. However, it may lead to redundancy if you're already using the provider and contract modules in the latest Ethers.js version. This redundancy, though, might not affect your application.
The impact this library may have on your app's bundle size varies depending on the context. It's not a concern for server-side scripts, but could influence the initial bundle size of client-side browser applications. Given this library tree-shakes Ethers.js dependencies, it's beneficial to use lazy loading to prevent an increase in your client application's initial bundle size. For a demonstration of lazy loading the library, refer to the example available here.
This repository includes examples you can execute locally. Navigate to the /examples
directory for additional README
information on how to run the demos locally. You can also explore a live demo of 0x-parser here.
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 291 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 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.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenanceādevelopers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.