Quicknode alerts works for token activity also?

Hi team

I was checking out the quick alerts feature of Quicknode and tried it for USDC token on ETH mainnet (especially for receiver events).

I was receiving alerts for ETH deposits but not for tokens on ERC chain (like USDC).

Am I doing something wrongly ?

Hi @akshaysoam8,

Yes, you can track USDC deposits for a specific address using the below expression.

(tx_logs_address == '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' && tx_logs_topic0 == '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' && tx_logs_topic2 =~ 'ADDRESS_OF_RECEIVER_WITHOUT_0x')

In the above expression, we track three things to get the USDC deposit for a specific address.

  1. The USDC Ethereum Mainnet contract address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 in tx_logs_address.

  2. The Transfer event of the smart contract, tx_logs_topic0 takes the hashed function signature of the Transfer event.

Function signature `Transfer(address,address,uint256)` 
Hashed function Signature `ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
Prefixed with 0x `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`
  1. This will be the receiver’s address; tx_logs_topic2 takes the receiver’s address. There are a few things to note here; since the log topics are in 32 byte format and the Ethereum address is 20 byte we’ll have to use a regex comparator =~ to check for strings matching our address.
    We will have to replace ADDRESS_OF_RECEIVER_WITHOUT_0x with the receiver’s address without the 0x prefix, to check for 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5 receiver address we’ll have to check for DAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5
1 Like

Thanks @sahil

I will try this out and then share the feedback.

1 Like

Hi @sahil

What you had suggested, it had worked.

We are doing a POC with quicknode alerts functionality.

But if there are two txns from same block number, then it’s missing one event.
In total 4 deposits were done on this address and we were notified 3 times.

Following are the txns coming from same block number:

Txn 1: Amount 0.5 USDC
Txn 2: Amount 1 USDC

Screenshot of our quicknode dashboard, where we received 3 events. Block number 18393273 came only once.

Hey Akshay,

So for the transactions where they were in the same block, did you check that payload? it should have both transactions in the same payload.

Thanks @sahil

We forgot to check the full payload. Thanks it had worked.

thanks for confirming @akshaysoam8

1 Like

Seems to be working properly for me!