@abi.encodePacked
ABI non-standard packed encoding, matching Solidity’s abi.encodePacked.
Returns: bytes
Syntax
Section titled “Syntax”@abi.encodePacked(types ...values)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
types |
string |
Comma-separated Solidity types (e.g. “address,uint256”) |
[...values] |
any |
Values to encode, one per type |
Examples
Section titled “Examples”# Pack an address and amountset $packed @abi.encodePacked("address,uint256" @me 1e18)print $packedSee Also
Section titled “See Also”- @abi.encodeCall — ABI-encode a function call
- @abi.decode — decode ABI-encoded data