Try it Live
Run ABI examples in the interactive playground
Usage Examples
Debug Transaction
See Also
- format - Format without argument values
Format ABI item with argument values for debugging
import * as Abi from 'tevm/Abi'
const transferFn = {
type: "function",
name: "transfer",
inputs: [
{ type: "address", name: "to" },
{ type: "uint256", name: "amount" }
]
}
const to = "0x742d35Cc6634C0532925a3b844Bc9e7595f51e3e"
const amount = 1000n
console.log("Calling:", Abi.formatWithArgs(transferFn, [to, amount]))
// "Calling: transfer(0x742d35Cc6634C0532925a3b844Bc9e7595f51e3e, 1000)"
Was this page helpful?