encode_packed
Convert Solidity type-value pairs into packed bytes using abi.encodePacked for efficient EVM data encoding in transactions and contract calls.
Instructions
Encode values using Solidity's abi.encodePacked (non-standard packed encoding)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"types": "<types>",
"values": "<values>"
},
"name": "encode_packed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| types | Yes | Array of Solidity types (e.g., ['address', 'uint256']) | |
| values | Yes | Array of values corresponding to the types |