Notifications: Attributes "address" and "counterAddress"

In EVM ADDRESS_EVENT and ADDRESS_TRANSACTION webhooks, native transfers return the receiver as address; token transfers return the sender as address.

In the current implementation, notifications for EVM chains (like Ethereum) return the parameters address and counterAddressas well as amount with some particularities. The transfer kind is in the type field; see webhook type values.

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

Alert TypeAssetFromToAmount
ADDRESS_TRANSACTION (native asset)Native: ALLcounterAddressAddressPositive
ADDRESS_TRANSACTION (tokens)Token: EVMAddresscounterAddressPositive
ADDRESS_TRANSACTION (tokens)Token: TRC_##counterAddressAddressPositive
ADDRESS_EVENT (native asset)Native: EVMcounterAddressAddressPositive
ADDRESS_EVENT (tokens)Token: EVMAddresscounterAddressPositive
ADDRESS_EVENT (tokens)Token: TRC_##counterAddressAddressPositive

All other Alert Types

The blockchain address you alerted 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"
}

Did this page help you?