Function: getSourceTokenFromExtraData()
getSourceTokenFromExtraData(
extraData:string|undefined,family:ChainFamily):string|undefined
Defined in: utils.ts:327
Reads the source token a multi-token pool sends in its destPoolData/extraData
(abi.encode(uint256 decimals, bytes sourceToken, bytes additionalPoolData)). Single-token pools
send no source token: their 0- or 32-byte payloads give undefined, as do other pools' payloads.
Parameters
| Parameter | Type | Description |
|---|---|---|
extraData | string | undefined | The transfer's extraData/destPoolData. |
family | ChainFamily | The source chain's family, to decode the source token address. |
Returns
string | undefined
The source token address, or undefined when the pool data does not carry one.