parseAbiParameters
Parses human-readable ABI parameters into AbiParameter
s. Re-exported from ABIType.
Import
import { parseAbiParameters } from 'viem'
Usage
import { parseAbiParameters } from 'viem'
const abiParameters = parseAbiParameters(
// ^? const abiParameters: [{ type: "address"; name: "from"; }, { type: "address";...
'address from, address to, uint256 amount',
)
Returns
Parsed ABI parameters.
Parameters
params
- Type:
string | string[]
Human-Readable ABI parameters.
import { parseAbiParameters } from 'viem'
const abiParameters = parseAbiParameters([
// ^? const abiParameters: [{ type: "tuple"; components: [{ type: "string"; name:...
'Baz bar',
'struct Baz { string name; }',
])