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

brc-20/activity endpoint seems skipping some transfers #318

Closed
alexqrid opened this issue Feb 29, 2024 · 6 comments
Closed

brc-20/activity endpoint seems skipping some transfers #318

alexqrid opened this issue Feb 29, 2024 · 6 comments
Assignees
Labels
brc20 index Related to inscriptions index

Comments

@alexqrid
Copy link

Describe the bug
Transaction ID 5252157e270d1d405fa5d58249832ca3aa706b84e4dad2a31e7f52373aec2b7b
Block# 832574
Inscription number 62813054
Oklink displays the transfer correctly, also this brc-20 inscription is on ordinals hiro, but when I try to query ordinals api at https://api.hiro.so/ordinals/v1/brc-20/activity?block_height=832574&limit=60
I don't see the transfer of MTMT token.

api.hiro.so response
{
    "limit": 60,
    "offset": 0,
    "total": 5,
    "results": [
        {
            "operation": "transfer",
            "ticker": "@LFG",
            "inscription_id": "a43f7d48a579ec2a6d83a8f5a7784c3b6a9b464421509341cfbf703cb9a456f3i0",
            "block_height": 832574,
            "block_hash": "000000000000000000020c8145de25b1e1e0a6312e377827a3015e15fdd574cd",
            "tx_id": "a43f7d48a579ec2a6d83a8f5a7784c3b6a9b464421509341cfbf703cb9a456f3",
            "location": "a43f7d48a579ec2a6d83a8f5a7784c3b6a9b464421509341cfbf703cb9a456f3:0:0",
            "address": "bc1pgkgq5862acyfzhgpuyeuazvkkdmtqnsdk8s74vps7mmd4wy66mqspxzskz",
            "timestamp": 1709233961000,
            "transfer": {
                "amount": "1.000000000000000000",
                "from_address": "bc1pgkgq5862acyfzhgpuyeuazvkkdmtqnsdk8s74vps7mmd4wy66mqspxzskz"
            }
        },
        {
            "operation": "transfer",
            "ticker": "Hat ",
            "inscription_id": "19063081d0054bc172e23204831e1942196f4c4d3d61b5355ccd0b6638afe5afi0",
            "block_height": 832574,
            "block_hash": "000000000000000000020c8145de25b1e1e0a6312e377827a3015e15fdd574cd",
            "tx_id": "19063081d0054bc172e23204831e1942196f4c4d3d61b5355ccd0b6638afe5af",
            "location": "19063081d0054bc172e23204831e1942196f4c4d3d61b5355ccd0b6638afe5af:0:0",
            "address": "bc1ppkvvemc6kr34xmghuzq6wtz8ln8gaudcaxm6tv3jemz7n7tswvnqsf570a",
            "timestamp": 1709233961000,
            "transfer": {
                "amount": "2194840340.000000000000000000",
                "from_address": "bc1ppkvvemc6kr34xmghuzq6wtz8ln8gaudcaxm6tv3jemz7n7tswvnqsf570a"
            }
        },
        {
            "operation": "transfer_send",
            "ticker": "SCAT",
            "inscription_id": "e7d87602464d51fc9b4e4043a818d25305bb59894d015e335cf01409b6e02cd0i0",
            "block_height": 832574,
            "block_hash": "000000000000000000020c8145de25b1e1e0a6312e377827a3015e15fdd574cd",
            "tx_id": "42b61dd60f32c1816f6a403a4d3a4331da0ce31cb9e913baa007a07cb12d05e8",
            "location": "42b61dd60f32c1816f6a403a4d3a4331da0ce31cb9e913baa007a07cb12d05e8:1:0",
            "address": "bc1pjrfp9thtquhue9lgqf7wwv20zedayqhutwzcn90yc749rftfdqdqdeh9vr",
            "timestamp": 1709233961000,
            "transfer_send": {
                "amount": "100000.000000000000000000",
                "from_address": "bc1pmphcpwv4skl3tctphypsfg8x8xf8pgymcs4sjvy3nzddnkhayzdsa4lq80",
                "to_address": "bc1pjrfp9thtquhue9lgqf7wwv20zedayqhutwzcn90yc749rftfdqdqdeh9vr"
            }
        },
        {
            "operation": "transfer",
            "ticker": "padd",
            "inscription_id": "f56ff58cb31e1785659f2035db8aaab9ee99f86b8ad7552915fb547ed4ab60afi0",
            "block_height": 832574,
            "block_hash": "000000000000000000020c8145de25b1e1e0a6312e377827a3015e15fdd574cd",
            "tx_id": "f56ff58cb31e1785659f2035db8aaab9ee99f86b8ad7552915fb547ed4ab60af",
            "location": "f56ff58cb31e1785659f2035db8aaab9ee99f86b8ad7552915fb547ed4ab60af:0:0",
            "address": "bc1ph5h27yy4ruu7yay4hgryjqllduyma0e0vj7dlynu5g2vk0mxpq8s8dlgql",
            "timestamp": 1709233961000,
            "transfer": {
                "amount": "826.000000000000000000",
                "from_address": "bc1ph5h27yy4ruu7yay4hgryjqllduyma0e0vj7dlynu5g2vk0mxpq8s8dlgql"
            }
        },
        {
            "operation": "transfer",
            "ticker": "cnlp",
            "inscription_id": "251e670288204272c88ea027e591b1f94fa919a2204b26ca9ed9f4772b465344i0",
            "block_height": 832574,
            "block_hash": "000000000000000000020c8145de25b1e1e0a6312e377827a3015e15fdd574cd",
            "tx_id": "251e670288204272c88ea027e591b1f94fa919a2204b26ca9ed9f4772b465344",
            "location": "251e670288204272c88ea027e591b1f94fa919a2204b26ca9ed9f4772b465344:0:0",
            "address": "bc1pep85uv92gfrjzdw74a82hnwy532resae70ymynpnxn2ldh82njzsa5gp8c",
            "timestamp": 1709233961000,
            "transfer": {
                "amount": "47619.047619047620000000",
                "from_address": "bc1pep85uv92gfrjzdw74a82hnwy532resae70ymynpnxn2ldh82njzsa5gp8c"
            }
        }
    ]
}

To Reproduce
curl https://api.hiro.so/ordinals/v1/brc-20/activity?block_height=832574&limit=60

Expected behavior
There's an appropriate transfer in the response.

@emilcondrea
Copy link

emilcondrea commented Mar 1, 2024

Many users report incorrect balance on twitter, when using wallets that use hiro APIs. It seems that the index is stale, as some wallets that transfered funds 1 week ago still show the funds. Can you check/reindex?

@rafaelcr rafaelcr added index Related to inscriptions index brc20 labels Mar 2, 2024
@rafaelcr
Copy link
Collaborator

rafaelcr commented Mar 2, 2024

Thanks for the report @alexqrid we're investigating

@alexqrid
Copy link
Author

alexqrid commented Mar 8, 2024

Yet another issue - empty address:
curl https://api.hiro.so/ordinals/v1/brc-20/activity?block_height=827749&limit=60:

...
{
            "operation": "mint",
            "ticker": "eorb",
            "inscription_id": "44702ea6f5d0d2f0f3d29d5e8bc75b3d396f4d52305aa9519de17f4f330e7988i0",
            "block_height": 827749,
            "block_hash": "00000000000000000003cce52e671b9d9a4df70b4d8946f4f479720110871338",
            "tx_id": "44702ea6f5d0d2f0f3d29d5e8bc75b3d396f4d52305aa9519de17f4f330e7988",
            "location": "f5ae37188423097995597355be9ac7999f36186f58a2a013da2e33499375c4b5:0:665136296",
            "address": "",
            "timestamp": 1706414938000,
            "mint": {
                "amount": "10.000000000000000000"
            }
        },
...

But oklink displays the address correctly.

@rafaelcr
Copy link
Collaborator

rafaelcr commented Mar 8, 2024

Thanks @alexqrid , it has a blank address because it was spent as fee. However, it shouldn't have been processed by BRC20 in that case. We're including this as part of the original fix to this issue.

@rafaelcr
Copy link
Collaborator

Thanks for your reports. This issue is now fixed and deployed. Please let me know if you see any more inconsistencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brc20 index Related to inscriptions index
Projects
Archived in project
Development

No branches or pull requests

4 participants