Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trc20 contract transaction records #138

Open
Drunkard-baifeng opened this issue Sep 9, 2024 · 1 comment
Open

trc20 contract transaction records #138

Drunkard-baifeng opened this issue Sep 9, 2024 · 1 comment

Comments

@Drunkard-baifeng
Copy link

This library is very useful, but I couldn't find a way to query trc20 contract transaction records. Is there any way?

@waynewu0411
Copy link

Hi @Drunkard-baifeng,
You can use this library to get the transactions in each block and filter out those transactions with toAddress as TRC20 token contract address. If you still want to get TRC20 transactions sent to specific wallet address, you can try to parse the data as the following json in the response.

"raw_data": {
                "contract": [
                    {
                        "parameter": {
                            "value": {
                                "data": "a9059cbb0000000000000000000000003032d3f151decbacadc3b46048f2b0133116d09e0000000000000000000000000000000000000000000000000000000003cdeb45",
                                "owner_address": "4126af3e8e85c2ce9337bc081418d07ee4a948c8b8",
                                "contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
                            },
                            "type_url": "type.googleapis.com/protocol.TriggerSmartContract"
                        },
                        "type": "TriggerSmartContract"
                    }
                ],
                "ref_block_bytes": "37a4",
                "ref_block_hash": "3a691d27a16cd8aa",
                "expiration": 1729069238874,
                "fee_limit": 27090000,
                "timestamp": 1729069178874
            },

Cheers,
Wayne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants