decodeData
Decodes the specified Safe transaction data.
Usage
_10import { apiKit } from './setup.ts'_10_10const data = '0x...'_10_10const decodedData = await apiKit.decodeData(data)
Returns
Promise<DataDecoded>
The transaction data decoded.
_10type DataDecoded = {_10 readonly method: string_10 readonly parameters: DecodedParameters[]_10}
Parameters
data
- Type:
string
The Safe transaction data to decode.
_10const decodedData = await apiKit.decodeData('0x...')
to
(Optional)
- Type:
string
The address of the receiving contract. If provided, the decoded data will be more accurate, as in case of an ABI collision the Safe Transaction Service would know which ABI to use
_10const decodedData = await apiKit.decodeData(_10 '0x...',_10 '0x...'_10)