-
Notifications
You must be signed in to change notification settings - Fork 1
How do we determine the tx type
The transaction service returns a list of transactions with certain attributes. How do we determine what kind of tx a certain transaction is? Here is a list of types we need to distinguish between.
I numbered them from 1.1.1 "Historic Safe to Safe ETH Transfer" to 2.3.1 which is a "Queued Custom Transaction".
We also need instructions on how to extract the values we need to display (according to Attributes in transaction list)
| Type | From -> | To | in/out | Currency |
|---|---|---|---|---|
| 1 | Safe | Safe | in/out | ETH |
| 2 | EOA | Safe | in | ETH |
| 3 | Safe | EOA | out | ETH |
| 4 | Safe | Safe | in/out | ERC20 |
| 5 | EOA | Safe | in | ERC20 |
| 6 | Safe | EOA | out | ERC20 |
| 7 | Safe | Safe | in/out | ERC721 |
| 8 | EOA | Safe | in | ERC721 |
| 9 | Safe | EOA | out | ERC721 |
| Type | Settings change |
|---|---|
| 1 | Add owner |
| 2 | Remove owner |
| 3 | Replace owner |
| 4 | Change Threshold |
| 5 | Change Mastercopy |
| 6 | Change Fallback Manager (Safes with version > 1.1.0) |
| Type | Type Name |
|---|---|
| 1 | Custom transaction |
A queued transaction is one such that its nonce is greater than that of the safe it corresponds to. In the other hand, history transactions have a nonce smaller of that of the safe to which they correspond.
Note: the list of transfers is only available in history transactions. There needs to be different heuristic to determine if a queued transaction corresponds to a transfer.
| Type | From -> | To | in/out | Currency |
|---|---|---|---|---|
| 1 | Safe | Safe | in/out | ETH |
| 2 | EOA | Safe | in | ETH |
| 3 | Safe | EOA | out | ETH |
| 4 | Safe | Safe | in/out | ERC20 |
| 5 | EOA | Safe | in | ERC20 |
| 6 | Safe | EOA | out | ERC20 |
| 7 | Safe | Safe | in/out | ERC721 |
| 8 | EOA | Safe | in | ERC721 |
| 9 | Safe | EOA | out | ERC721 |
| Type | Settings change |
|---|---|
| 1 | Add owner |
| 2 | Remove owner |
| 3 | Replace owner |
| 4 | Change Threshold |
| 5 | Change Mastercopy |
| 6 | Change Fallback Manager (Safes with version > 1.1.0) |
| Type | Type Name |
|---|---|
| 1 | Custom transaction |
- What do we do with a otherwise simple transfer that contains a data section? Is this always a custom transaction?
See: Transaction app types and mapping from json to UI layer