
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
multicall-decode
Advanced tools
EVM multicall calldata decoder
npm install multicall-decode
const { decodeRaw } = require("multicall-decode");
const CALLDATA =
"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008413ead5620000000000000000000000005c8cd1c2f2997f7a041026cc29de8177b4c6d8ec00000000000000000000000089e54f174ca5ff39cf53ab58004158e2ca012eac0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000035f2482336c0d4c2ba6e94faa1d66f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164883164560000000000000000000000005c8cd1c2f2997f7a041026cc29de8177b4c6d8ec00000000000000000000000089e54f174ca5ff39cf53ab58004158e2ca012eac0000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2764c00000000000000000000000000000000000000000000000000000000000a11a8000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000a56d35c029fd16645e079000000000000000000000000000000000000000000000000000000e840308c030000000000000000000000000000000000000000000a503344abc0fbe23670910000000000000000000000005a2b5cb4ce921abd65f0c66c2c839894bfc2076c000000000000000000000000000000000000000000000000000000006244356a00000000000000000000000000000000000000000000000000000000";
async function main() {
console.log(await decodeRaw(CALLDATA));
}
main();
//[
// [
// {
// signature: 'mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))',
// _id: 0,
// parameters: [Array],
// valid: true
// }
// ],
// [
// {
// signature: 'createAndInitializePoolIfNecessary(address,address,uint24,uint160)',
// _id: 0,
// parameters: [Array],
// valid: true
// }
// ]
//]
const { decodeCalls } = require("multicall-decode");
const Web3 = require('web3');
const CALLDATA =
"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008413ead5620000000000000000000000005c8cd1c2f2997f7a041026cc29de8177b4c6d8ec00000000000000000000000089e54f174ca5ff39cf53ab58004158e2ca012eac0000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000035f2482336c0d4c2ba6e94faa1d66f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164883164560000000000000000000000005c8cd1c2f2997f7a041026cc29de8177b4c6d8ec00000000000000000000000089e54f174ca5ff39cf53ab58004158e2ca012eac0000000000000000000000000000000000000000000000000000000000000bb8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2764c00000000000000000000000000000000000000000000000000000000000a11a8000000000000000000000000000000000000000000000000000000e8d4a510000000000000000000000000000000000000000000000a56d35c029fd16645e079000000000000000000000000000000000000000000000000000000e840308c030000000000000000000000000000000000000000000a503344abc0fbe23670910000000000000000000000005a2b5cb4ce921abd65f0c66c2c839894bfc2076c000000000000000000000000000000000000000000000000000000006244356a00000000000000000000000000000000000000000000000000000000";
const web3 = new Web3();
async function main() {
const calls = web3.eth.abi.decodeParameter("bytes[]", CALLDATA);
console.log(await decodeCalls(calls));
}
main();
//[
// [
// {
// signature: 'mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))',
// _id: 0,
// parameters: [Array],
// valid: true
// }
// ],
// [
// {
// signature: 'createAndInitializePoolIfNecessary(address,address,uint24,uint160)',
// _id: 0,
// parameters: [Array],
// valid: true
// }
// ]
//]
The input of decodeRaw
is expected to be an abi encoded
hex string representing a bytes[]
.
The input of decodeCalls
is expected to be an abi decoded
array of bytes.
The output is an array containing one set of candidates for each call embedded in the input.
Each set of candidates is itself an array of objects, each object describes a candidate call :
Property | Type | Description | Optional |
---|---|---|---|
signature | string | The signature of the candidate function | No |
_id | number | The id of the candidate function | No |
parameters | array | An array of Parameter objects describing the function's input | Yes |
valid | boolean | A boolean value stating the validity of this candidate. | No |
If decoding was successfull, the parameters of a valid candidate are present in the parameters
array :
Property | Description |
---|---|
type | The type of the parameter (e.g., address) |
_id | The ID of the parameter / Index in the function's signature |
value | The value of the parameter as returned by Web3 |
FAQs
EVM multicall calldata decoder
The npm package multicall-decode receives a total of 5 weekly downloads. As such, multicall-decode popularity was classified as not popular.
We found that multicall-decode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.