Socket
Book a DemoInstallSign in
Socket

@rawr-multicall/no-side-effect-call

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rawr-multicall/no-side-effect-call

Powerful, type-safe alternative to Multicall for off-chain smart contract query

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@rawr-multicall/no-side-effect-call

Utility to call contract without side effect of Rawr-multicall.

Please refer to [Rawr-mulitcall] for more details usage.

Contract

The contract only contains a fallback that will call a method of another contract, with the given address and call data. After that it will revert the success status along side with the result.

Input layout for fallback

FieldsSize (bytes)
Gas Limit4
Address20
Call dataThe rest
  • Data is packed tightly together, and won't align to word size.
  • If the call does not specify gas limit, the library will automatically set it to $2^{32} - 1$ before sending.
  • value is not required, since we can just use msg.value (i.e CALLVALUE instruction).
  • call data size is not required either, as we can use CALLDATASIZE instruction.

Output layout for fallback

Or rather the laytout of the revert.

FieldsSize (bytes)
Success1
DataThe rest

This will be the easiest way to compress the data. The result will be decoded on the client side rather than in the contract.

Keywords

rawr-multicall

FAQs

Package last updated on 18 Jul 2023

Did you know?

Socket

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.

Install

Related posts