{"library":"viem-deal","type":"library","category":null,"description":"viem-deal is a utility library, currently at stable version 2.0.4 (released October 2024), designed to extend viem clients with powerful capabilities for manipulating ERC20 token balances on development and test networks. It enables developers to \"deal\" arbitrary amounts of any ERC20 token to any account on `setStorageAt`-compatible environments like Anvil, Hardhat, or Tevm-based forks. This functionality mirrors Foundry's `deal` cheat code, achieving balance manipulation by dynamically identifying the correct storage slot for an account's balance using `eth_createAccessList` and then overriding that storage slot's value with `setStorageAt`. The library provides a rapid and efficient method for setting up test scenarios with precise token balances without actual on-chain minting or transfers. The project shows a frequent release cadence, with multiple patch and minor releases in October 2024. A key differentiator is its reliance on RPC cheat codes, which streamlines test setup compared to transactional interactions. The package ships with TypeScript types, ensuring a type-safe development experience.","language":"javascript","status":"active","version":"2.0.4","tags":["javascript","viem","deal","hardhat","anvil","test","cheat","rpc","erc20","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install viem-deal","imports":["import { dealActions } from 'viem-deal';","import { createTestClient, http } from 'viem';","import { foundry } from 'viem/chains';"]},{"cmd":"yarn add viem-deal","imports":[]},{"cmd":"pnpm add viem-deal","imports":[]}],"homepage":"https://viem-deal.vercel.app","github":"https://github.com/Rubilmax/viem-deal","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/viem-deal","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/viem-deal/compatibility"}}