https://github.com/sz-piotr/ethereum-test-provider
An ethers provider used for testing applications using the ethereum blockchain
https://github.com/sz-piotr/ethereum-test-provider
ethereum ethersjs integration-testing provider snapshots testing typescript
Last synced: 29 days ago
JSON representation
An ethers provider used for testing applications using the ethereum blockchain
- Host: GitHub
- URL: https://github.com/sz-piotr/ethereum-test-provider
- Owner: sz-piotr
- License: mit
- Created: 2019-11-30T23:07:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T19:33:56.000Z (about 3 years ago)
- Last Synced: 2025-04-01T20:13:57.401Z (30 days ago)
- Topics: ethereum, ethersjs, integration-testing, provider, snapshots, testing, typescript
- Language: TypeScript
- Homepage:
- Size: 347 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://circleci.com/gh/sz-piotr/ethereum-test-provider)
# Ethereum TestProvider
An ethers provider used for testing applications using the ethereum blockchain.
This project aims to provide a painless solution for writing blockchain tests.
Main features include:- Ethers.js based, no `web3` dependency
- Full TypeScript support
- Snapshots (not implemented)
- Changing time (not implemented)
- Multiple mining modes (not implemented)
- Provides wallets preloaded with ETH
- Multiple providers for the same test chain## Installation (not published yet)
With Yarn:
```
yarn add --dev ethereum-test-provider
```With npm:
```
npm install -D ethereum-test-provider
```## Example
```typescript
import { TestProvider } from 'ethereum-test-provider'const provider = new TestProvider()
const [sender] = provider.getWallets()
const recipient = provider.createEmptyWallet()await sender.sendTransaction({
to: recipient.address,
value: utils.parseEther('3.1415'),
})console.log(await recipient.getBalance()) // 3.1415
```