Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.