![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@mean-finance/call-simulation
Advanced tools
This repository adds existing contracts the ability to perform stateless simulations
It's fairly common to try to predict what a transaction might return, or how it would affect other contracts. There are many ways to do so, ranging from complex solutions like Tenderly or Alchemy, to simple static calls. One popular way is through the use of Multicall, which allows to group many different calls into one, therefore avoiding being rate limited by RPCs.
However, there is one area where Multicall might not be the best solution. For example, if you tried to simulate multiple swap transactions to figure out which one would yield better results, a Multicall won't work. Since the first call would modify the storage and transfer tokens between accounts, it could happen than all other quotes would fail. However, it would be interesting to be able to simulate these quotes without actually affecting the state.
And that's where this repository comes into place. The idea is to give existing contracts the ability to simulate calls in a stateless way, so that they can be run independently from each other. Also, it provides the ability to simulate these calls similarly to a Multicall, so as to avoid issues with RPC rate limiting.
This is a list of the most frequently needed commands.
Build the contracts:
$ forge build
Delete the build artifacts and cache directories:
$ forge clean
Compile the contracts:
$ forge build
Get a test coverage report:
$ forge coverage
Format the contracts:
$ forge fmt
Get a gas report:
$ forge test --gas-report
Lint the contracts:
$ pnpm lint
Run the tests:
$ forge test
This project is licensed under GLP 3.0.
FAQs
This repository adds existing contracts the ability to perform stateless simulations
We found that @mean-finance/call-simulation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
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.