1

enter image description herein a multisend tx is there a way to fetch which tx has which currency as the data fetched through safe API and safe SDK only provides that it is a multisend tx and whom are you sending to and what is the amount but not the type of token/currency

enter image description here How does Safe shows all the token and the amount in their UI.

Venkatesh
  • 19
  • 4

2 Answers2

1

Each item in multiSend is unique txn. You can identify the token, amount and address receiving the funds by decoding the calldata. A simpler way to decode this for all txn's that have value != 0 and data==nil can be considered as eth transfers. For erc20 transfers decode them using erc20-abi. An example on how to use ethers can be found here: How to decode input data in ethersjs

Bapi Reddy
  • 91
  • 1
0

To understand the content of a transaction, you indeed need to decode the transaction data. As with Safe{Wallet} UI, you can check the open source code to understand how it is displayed, especially here to see how calldata is decoded, and here to see how it is rendered.

Hope it helps, Louis