1

There are many meme token are created at ethereum network, and most are pull rugged project, they create a meme token and remove liquidity when people bought.

For example, there is a remove liquidity transaction: https://etherscan.io/tx/0x07881d7d5f9479020e2a823cbd2c6bf9609f35ed4876a4077e70a13a7157251f

This transaction has 9 log events, So I think if transaction contain those 9 log events most are "remove liquidity" transaction, And I wanna to query out those log with ordered topic:

v2query := ethereum.FilterQuery{
    FromBlock: big.NewInt(15639422),
    ToBlock:   big.NewInt(15640422),
    Topics: [][]common.Hash{
        {
            common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"),
        },
        {
            common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
        },
        {
            common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
        },
        {
            common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
        },
        {
            common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
        },
        {
            common.HexToHash("0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1"),
        },
        {
            common.HexToHash("0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496"),
        },
        {
            common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"),
        },
        {
            common.HexToHash("0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65"),
        },
    },
}

But I got a error message with:

400 Bad Request: {"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"invalid 1st argument: filter 'topics': array size cannot exceed 4"}}

2 Answers 2

3
+25

Basically, this is a tx call to UniswapV3 contract. But the issued here might be, you wanna find the calling method is related functions like 'removeLiquidity()', 'withdraw()'...etc.

In this example, because of the structure of Uniswap V3, the method call is called 'multicall()' function. That means this is a Swap behavior rather than remove liquidity.

enter image description here

If you want to see those revmove liquidity behavior, you can tried to get all the tx records. For example, you can find those record on Dune or BitQuery

1
  • The question is about how to use FilterQuery with more than four topics.
    – Ismael
    Oct 11, 2022 at 2:23
0

As mentioned in the above answer, you can use Bitquery's streaming APIs to subscribe to real-time streaming for calls, events, transfers, etc.

For example, in the following query, i am subscribing to removeLiquidity and Withdrawal methods on the ethereum blockchain

https://ide.bitquery.io/Subscribing-to-removeLiquidity-Call-on-Ethereum.

To learn more you can check out their docs https://docs.bitquery.io/docs/category/smartcontract-calls/

Disclosure: I work for Bitquery

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.