https://github.com/bh2smith/solidity-multicaller
Solidity testing utility for calling the same function several times in a single transaction.
https://github.com/bh2smith/solidity-multicaller
devtool ethereum testing-tools
Last synced: 10 months ago
JSON representation
Solidity testing utility for calling the same function several times in a single transaction.
- Host: GitHub
- URL: https://github.com/bh2smith/solidity-multicaller
- Owner: bh2smith
- Created: 2019-06-26T09:38:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T17:34:21.000Z (about 3 years ago)
- Last Synced: 2025-03-30T06:24:23.147Z (11 months ago)
- Topics: devtool, ethereum, testing-tools
- Language: JavaScript
- Homepage:
- Size: 319 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/bh2smith/solidity-multicaller)
[](https://badge.fury.io/js/solidity-multicall)
[](https://coveralls.io/github/bh2smith/solidity-multicaller)
# Solidity Multi-Transaction
Solidity testing utility for calling the same function several times in a single transaction. Such a tool can be used during unit testing to achieve _conditional coverage_ in situations that might require several transactions to be executed simultaneously.
## Installation & Usage
```bash
npm install -g solidity-multicall
```
See [test file](https://github.com/bh2smith/solidity-multi-transaction/blob/master/test/test_multi.js) for example usage
## Practical use case
Request collection in batches having limited capacity which expire after a pre-defined amount of time.
That is, the batch collection of requests "closes" (i.e. becomes inactive) and can be processed after either a pre-defined amount of time or when the batch is full/capacity reached.
If the batch capacity is too large to fill in short time period (say the average time of a single block), then testing desired functionality of how the contract handle's full batches.