{"repo":"DePayFi/web3-mock","free":true,"listed":false,"github":"https://github.com/DePayFi/web3-mock","clone":"git clone https://github.com/DePayFi/web3-mock.git","description":"🤡 JavaScript library to mock web3 responses either by emulating web3 wallets or web3 RPC requests.","language":"JavaScript","stars":94,"topics":["javascript","web3","mock","testing","blockchain","rpc"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"Simplify testing your dApps by mocking blockchain providers and wallets with web3-mock. Quickstart or Make sure you setup Jest, Cypress or Playwright correctly before start using web3-mock. Basics EVM: Basics SVM: Basics Requires explicit provider mocking (see Providers) Advanced EVM: Advanced SVM: Advanced Providers viem / wagmi viem makes it's own internal public client inaccesible for external mocks due to their decorator pattern (see: https://github.com/wagmi-dev/viem/blob/main/src/clients/createPublicClient.ts#LL86C8-L86C21). That's why only the custom(window.ethereum) is compatible with web3-mock : Support This library supports the following blockchains: - Ethereum - BNB Smart Chain - Polygon - Solana - Fantom - Arbitrum - Avalanche - Gnosis - Optimism - Base - Worldchain This library supports the all crypto wallets that inject window.ethereum or window.solana like: - MetaMask - Coinbase Wallet - Phantom 100+ different wallets via WalletConnect. Platform specific packaging In case you want to use and package only specific platforms, use platform specific packages: EVM (Ethereum Virtual Machine) platform specific package SVM (Solana Virtual Machine) platform specific package Functionalities Basic Implicit Mocks EVM: Basic Implicit Mocks SVM: Basic Implicit Mocks Accounts Mocks accounts and wallet connect processes: Also allows you to test a \"connect wallet screen\" by delaying the mock: Also allows you to test a \"connection failed\" by returning an error: Request Data You ","default_branch":null,"files":null,"tree":[],"storefront":"/r/DePayFi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DePayFi/web3-mock/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}