Attributes "address" and "counterAddress"
In the current implementation, notifications for EVM chains (like Ethereum) return the parameters address
and counterAddress
as well as amount
with some particularities.
v4 ADDRESS_EVENT and v3 ADDRESS_TRANSACTION
Native assets:
- Sender (From) --> "counterAddress".
- Receiver (To) --> "address".
- "Amount" is only negative in the fee hook.
Token assets:
- Sender (From) --> "address"
- Receiver (To) --> "counterAddress".
- "Amount" is only negative in the fee hook.
Tron assets work the other way around
Table of Equivalences: EVM and Tron
Subscription Type | Asset | From | To | Amount |
---|---|---|---|---|
ADDRESS_TRANSACTION (native asset) | Native: ALL | counterAddress | Address | Positive |
ADDRESS_TRANSACTION (tokens) | Token: EVM | Address | counterAddress | Positive |
ADDRESS_TRANSACTION (tokens) | Token: TRC_## | counterAddress | Address | Positive |
ADDRESS_EVENT (native asset) | Native: EVM | counterAddress | Address | Positive |
ADDRESS_EVENT (tokens) | Token: EVM | Address | counterAddress | Positive |
ADDRESS_EVENT (tokens) | Token: TRC_## | counterAddress | Address | Positive |
All other Subscription Types
The blockchain address you subscribed to is always returned as "address"
Example notification
For this example, the User has a subscription_ID
associated with the following address: 0x80b369e41e8a9f2c6e181fdf906e0a6073fa0a95
.
{
"address": "0x279b470171436383932e0ebf93ed0f71245b4ee8",
"amount": "0.004",
"asset": "MATIC",
"blockNumber": 7355450,
"counterAddress": "0x80b369e41e8a9f2c6e181fdf906e0a6073fa0a95",
"txId": "0x3d7f7c14ace5d60fdca0aa3616fc311b7d47ecc0d066c05f306bb814a98cb210",
"type": "native",
"chain": "polygon-amoy",
"subscriptionType": "ADDRESS_EVENT"
}
Updated 21 days ago