parseAbiParameters โ
Parses human-readable ABI parameters into AbiParameter
s. Re-exported from ABIType.
Import โ
ts
import { parseAbiParameters } from 'viem'
Usage โ
ts
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.
ts
import { parseAbiParameters } from 'viem'
const abiParameters = parseAbiParameters([
// ^? const abiParameters: [{ type: "tuple"; components: [{ type: "string"; name:...
'Baz bar',
'struct Baz { string name; }',
])