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

HIP-1008: Enhance Mirror Node Contract Log REST API with transaction hash #1008

Merged
merged 5 commits into from
Jul 25, 2024

Conversation

georgi-l95
Copy link
Contributor

Description:
This PR describes the enhancment of the mirror node contract log rest api with transaction hash query parameter

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: georgi-l95 <glazarov95@gmail.com>
@georgi-l95 georgi-l95 self-assigned this Jul 12, 2024
@georgi-l95 georgi-l95 requested a review from mgarbs as a code owner July 12, 2024 17:33
@georgi-l95 georgi-l95 changed the title HIP 1007 Enhance Mirror Node Contract Log REST API with transaction hash HIP-1008: Enhance Mirror Node Contract Log REST API with transaction hash Jul 12, 2024
Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for hedera-hips ready!

Name Link
🔨 Latest commit 6cc3dbc
🔍 Latest deploy log https://app.netlify.com/sites/hedera-hips/deploys/66a2df3bd7140e000707137a
😎 Deploy Preview https://deploy-preview-1008--hedera-hips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: georgi-l95 <glazarov95@gmail.com>
HIP/hip-1008.md Outdated Show resolved Hide resolved
HIP/hip-1008.md Outdated Show resolved Hide resolved
HIP/hip-1008.md Outdated Show resolved Hide resolved
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
steven-sheehy
steven-sheehy previously approved these changes Jul 12, 2024
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

xin-hedera
xin-hedera previously approved these changes Jul 13, 2024
Copy link

@xin-hedera xin-hedera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Nana-EC
Nana-EC previously approved these changes Jul 15, 2024
Signed-off-by: Michael Garber <michael.garber@swirldslabs.com>
@mgarbs mgarbs dismissed stale reviews from Nana-EC, xin-hedera, and steven-sheehy via 65e3165 July 17, 2024 13:42
Nana-EC
Nana-EC previously approved these changes Jul 20, 2024
@Neurone
Copy link
Contributor

Neurone commented Jul 24, 2024

Hi guys, how is this different from using the /api/v1/contracts/results/{transactionIdOrHash} endpoint?

For example, this is just a random mainnet transaction, and I can get the logs by querying the mirror node with the 32 byte Ethereum format, and I get all the logs:

⮞ curl --silent https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/0xcc7bfea2d35e4bcf27bfe60d19433efa8e03f3d6fbafebe0e21c0f24bcee3d0f | jq
{
  "address": "0x00000000000000000000000000000000003c437a",
  "amount": 2500000000000,
  "bloom": "0x00000080000000102001000000000000000000000000020100000000000020000000000000000000800000000000000000000000010022000000004040020040010040000008200800000000000000000000008000800001000000000000000000000000020000000000000000200800000000000000000000200040000880000000000000000000000000008000000000000000000000000000200000000000000080000004000000000000000000000000000000000000000000000000000000080001000000000000000000000000000000000000000000000000000020000000000000000004000000000800000000000000000080100000000000800000",
  "call_result": "0x0000000000000000000000000000000000000000000000000000000062a349f6",
  "contract_id": "0.0.3949434",
  "created_contract_ids": [],
  "error_message": null,
  "from": "0x000000000000000000000000000000000056dc0c",
  "function_parameters": "0x414bf3890000000000000000000000000000000000000000000000000000000000163b5a000000000000000000000000000000000000000000000000000000000006f89a00000000000000000000000000000000000000000000000000000000000005dc000000000000000000000000756dab6280de64f2c58a2c693a1528fcaf23ec5a0000000000000000000000000000000000000000000000000000000066a18f8900000000000000000000000000000000000000000000000000000246139ca80000000000000000000000000000000000000000000000000000000000629b8d9c0000000000000000000000000000000000000000000000000000000000000000",
  "gas_consumed": 209996,
  "gas_limit": 2000000,
  "gas_used": 1600000,
  "timestamp": "1721863475.979812003",
  "to": "0x00000000000000000000000000000000003c437a",
  "hash": "0xcc7bfea2d35e4bcf27bfe60d19433efa8e03f3d6fbafebe0e21c0f24bcee3d0f",
  "block_hash": "0x702fa733df1414be14a5fa96fa6e487b363fb6e2dfc62fd3b457aa9365e58818673d13d54760641e90e9a11c1c691d1c",
  "block_number": 66915917,
  "logs": [
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "bloom": "0x00000080000000000000000000000000000000000000020000000000000020000000000000000000000000000000000000000000010000000000000000000040000040000000000000000000000000000000008000800000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000008000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000004000000000800000000000000000000000000000000800000",
      "contract_id": "0.0.3964804",
      "data": "0x0000000000000000000000000000000000000000000000000000000062a349f6",
      "index": 0,
      "topics": [
        "0x5f2147fb558c977441fbdfebcf8cd5776606adc8da5ff95566fc2a4137e54d13",
        "0x000000000000000000000000c5b707348da504e9be1bd4e21525459830e7b11d",
        "0x000000000000000000000000756dab6280de64f2c58a2c693a1528fcaf23ec5a",
        "0x000000000000000000000000000000000000000000000000000000000006f89a"
      ]
    },
    {
      "address": "0x0000000000000000000000000000000000163b59",
      "bloom": "0x00000000000000102001000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000004000020000000000000000000000000000000000000000000000000001000000000000000000000000020000000000000000000800000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000100000000000000000",
      "contract_id": "0.0.1456985",
      "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
      "index": 1,
      "topics": [
        "0x831ac82b07fb396dafef0077cea6e002235d88e63f35cbd5df2c065107f1e74a",
        "0x0000000000000000000000000000000000000000000000000000000000000000",
        "0x00000000000000000000000000000000000000000000000000000000003c437a"
      ]
    },
    {
      "address": "0x0000000000000000000000000000000000163b59",
      "bloom": "0x00000000000000102001000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000004000020000010000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080100000000000000000",
      "contract_id": "0.0.1456985",
      "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
      "index": 2,
      "topics": [
        "0x831ac82b07fb396dafef0077cea6e002235d88e63f35cbd5df2c065107f1e74a",
        "0x0000000000000000000000000000000000000000000000000000000000163b59",
        "0x00000000000000000000000000000000000000000000000000000000003c437a"
      ]
    },
    {
      "address": "0x0000000000000000000000000000000000163b59",
      "bloom": "0x00000000000000102000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000002000000004040020000000000000008000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "contract_id": "0.0.1456985",
      "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
      "index": 3,
      "topics": [
        "0x5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62",
        "0x00000000000000000000000000000000000000000000000000000000003c437a",
        "0x00000000000000000000000000000000000000000000000000000000003c437a"
      ]
    },
    {
      "address": "0x00000000000000000000000000000000003c437a",
      "bloom": "0x00000000000000002000000000000000000000000000000100000000000000000000000000000000800000000000000000000000000000000000000000020040000040000000200000000000000000000000008000000000000000000000000000000000000000000000000000200000000000000000000000200000000000000000000000000000000000000000000000000000000000000000200000000000000000000004000000000000000000000000000000000000000000000000000000080001000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000",
      "contract_id": "0.0.3949434",
      "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
      "index": 4,
      "topics": [
        "0x5f2147fb558c977441fbdfebcf8cd5776606adc8da5ff95566fc2a4137e54d13",
        "0x00000000000000000000000000000000000000000000000000000000003c437a",
        "0x000000000000000000000000c5b707348da504e9be1bd4e21525459830e7b11d",
        "0x0000000000000000000000000000000000000000000000000000000000163b5a"
      ]
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "bloom": "0x00000080000000002000000000000000000000000000020000000000000020000000000000000000800000000000000000000000000020000000000000020000000000000000000800000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000800000",
      "contract_id": "0.0.3964804",
      "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff9d5cb60a00000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000026dd1879916d967715f2373c8b00000000000000000000000000000000000000000000000000002c1e4b6246380000000000000000000000000000000000000000000000000000000000011df4",
      "index": 5,
      "topics": [
        "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
        "0x00000000000000000000000000000000000000000000000000000000003c437a",
        "0x000000000000000000000000756dab6280de64f2c58a2c693a1528fcaf23ec5a"
      ]
    }
  ],
  "result": "SUCCESS",
  "transaction_index": 2169,
  "state_changes": [
    {
      "address": "0x0000000000000000000000000000000000163b59",
      "contract_id": "0.0.1456985",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "value_read": "0x0000000000000000000000000000000000000000000000000000000000163b5a",
      "value_written": null
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "value_read": "0x00016603e803e801b8011ddb0000000000000026d0476cd54b31a0432df2b17b",
      "value_written": "0x00016603e803e801b8011df40000000000000026dd1879916d967715f2373c8b"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000001",
      "value_read": "0x00000000000000000000000000000000005fc4cc953ccd3c4fdeea40c6a02008",
      "value_written": null
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x00000000000000000000000000000000000000000000000000000000000001c0",
      "value_read": "0x01000033ac000002490666a6d9f3b0cedb28eb8b6b0001621adbef1c66a18d32",
      "value_written": null
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000002",
      "value_read": "0x00000000000000000000000000000001827f81feed58a340532bc80beae8f2d2",
      "value_written": "0x0000000000000000000000000000000182839d824daf134d981963efa8a2986f"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000003",
      "value_read": "0x00000000000000000000000d2e7345ae00000000000000000000000001a41f8f",
      "value_written": "0x00000000000000000000000d53b403ee00000000000000000000000001a41f8f"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x0000000000000000000000000000000000000000000000000000000000000004",
      "value_read": "0x00000000000000000000000000000000000000000000000000002da1fa0d32c2",
      "value_written": "0x00000000000000000000000000000000000000000000000000002c1e4b624638"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x1d0d48568343e0c318307d6a3df806b1ed226b712d0eefd7298ef97ba328225d",
      "value_read": "0xfffffffffffffffffffffe7c515513760000000000000000000001edee636f6a",
      "value_written": null
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x1d0d48568343e0c318307d6a3df806b1ed226b712d0eefd7298ef97ba328225e",
      "value_read": "0x00000000000000000000000000000000000207b9b3639a188edec81de2be5f18",
      "value_written": "0x00000000000000000000000000000000005dbd12e1d93323c1002222e3e1c0f0"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x1d0d48568343e0c318307d6a3df806b1ed226b712d0eefd7298ef97ba328225f",
      "value_read": "0x000000000000000000000000000000000c00017495c57e889cf0649efc1ad844",
      "value_written": "0x000000000000000000000000000000017682d627f0d0180770cc033e6bd4132a"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0x1d0d48568343e0c318307d6a3df806b1ed226b712d0eefd7298ef97ba3282260",
      "value_read": "0x01000d0aee0000000000000015e06a14f2e5c233cea63cd73a00000eaf341118",
      "value_written": "0x0166948244000033ac0000023325fc91e70dee9b0c82aeb4310001536ba7de04"
    },
    {
      "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
      "contract_id": "0.0.3964804",
      "slot": "0xca4d0c6c94a9477136dd41a99cc19ecbe441c8f6609efe7c6fa65be007a47323",
      "value_read": "0x00000040810801ff4501ebddfdfdfffffffbfdfefefffffffbffffe7fffffef4",
      "value_written": null
    }
  ],
  "status": "0x1",
  "failed_initcode": null,
  "access_list": "0x",
  "block_gas_used": 3048898,
  "chain_id": "0x127",
  "gas_price": "0x092",
  "max_fee_per_gas": "0x",
  "max_priority_fee_per_gas": "0x",
  "r": "0x57047646cd71876b9c8e3989930de46e259c51b6ca013de841361cca34dbcfff",
  "s": "0x39bb0f720841393039ac885b7fdec31fa4c3efa7d4350c6cb8bea709875618fc",
  "type": 0,
  "v": 626,
  "nonce": 13320
}

or, for a shorter result:

⮞ curl --silent --insecure https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/0xcc7bfea2d35e4bcf27bfe60d19433efa8e03f3d6fbafebe0e21c0f24bcee3d0f | jq .logs
[
  {
    "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
    "bloom": "0x00000080000000000000000000000000000000000000020000000000000020000000000000000000000000000000000000000000010000000000000000000040000040000000000000000000000000000000008000800000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000008000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000004000000000800000000000000000000000000000000800000",
    "contract_id": "0.0.3964804",
    "data": "0x0000000000000000000000000000000000000000000000000000000062a349f6",
    "index": 0,
    "topics": [
      "0x5f2147fb558c977441fbdfebcf8cd5776606adc8da5ff95566fc2a4137e54d13",
      "0x000000000000000000000000c5b707348da504e9be1bd4e21525459830e7b11d",
      "0x000000000000000000000000756dab6280de64f2c58a2c693a1528fcaf23ec5a",
      "0x000000000000000000000000000000000000000000000000000000000006f89a"
    ]
  },
  {
    "address": "0x0000000000000000000000000000000000163b59",
    "bloom": "0x00000000000000102001000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000004000020000000000000000000000000000000000000000000000000001000000000000000000000000020000000000000000000800000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000100000000000000000",
    "contract_id": "0.0.1456985",
    "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
    "index": 1,
    "topics": [
      "0x831ac82b07fb396dafef0077cea6e002235d88e63f35cbd5df2c065107f1e74a",
      "0x0000000000000000000000000000000000000000000000000000000000000000",
      "0x00000000000000000000000000000000000000000000000000000000003c437a"
    ]
  },
  {
    "address": "0x0000000000000000000000000000000000163b59",
    "bloom": "0x00000000000000102001000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000004000020000010000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080100000000000000000",
    "contract_id": "0.0.1456985",
    "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
    "index": 2,
    "topics": [
      "0x831ac82b07fb396dafef0077cea6e002235d88e63f35cbd5df2c065107f1e74a",
      "0x0000000000000000000000000000000000000000000000000000000000163b59",
      "0x00000000000000000000000000000000000000000000000000000000003c437a"
    ]
  },
  {
    "address": "0x0000000000000000000000000000000000163b59",
    "bloom": "0x00000000000000102000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000002000000004040020000000000000008000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "contract_id": "0.0.1456985",
    "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
    "index": 3,
    "topics": [
      "0x5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62",
      "0x00000000000000000000000000000000000000000000000000000000003c437a",
      "0x00000000000000000000000000000000000000000000000000000000003c437a"
    ]
  },
  {
    "address": "0x00000000000000000000000000000000003c437a",
    "bloom": "0x00000000000000002000000000000000000000000000000100000000000000000000000000000000800000000000000000000000000000000000000000020040000040000000200000000000000000000000008000000000000000000000000000000000000000000000000000200000000000000000000000200000000000000000000000000000000000000000000000000000000000000000200000000000000000000004000000000000000000000000000000000000000000000000000000080001000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000",
    "contract_id": "0.0.3949434",
    "data": "0x00000000000000000000000000000000000000000000000000000246139ca800",
    "index": 4,
    "topics": [
      "0x5f2147fb558c977441fbdfebcf8cd5776606adc8da5ff95566fc2a4137e54d13",
      "0x00000000000000000000000000000000000000000000000000000000003c437a",
      "0x000000000000000000000000c5b707348da504e9be1bd4e21525459830e7b11d",
      "0x0000000000000000000000000000000000000000000000000000000000163b5a"
    ]
  },
  {
    "address": "0xc5b707348da504e9be1bd4e21525459830e7b11d",
    "bloom": "0x00000080000000002000000000000000000000000000020000000000000020000000000000000000800000000000000000000000000020000000000000020000000000000000000800000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000800000",
    "contract_id": "0.0.3964804",
    "data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff9d5cb60a00000000000000000000000000000000000000000000000000000246139ca8000000000000000000000000000000000000000026dd1879916d967715f2373c8b00000000000000000000000000000000000000000000000000002c1e4b6246380000000000000000000000000000000000000000000000000000000000011df4",
    "index": 5,
    "topics": [
      "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
      "0x00000000000000000000000000000000000000000000000000000000003c437a",
      "0x000000000000000000000000756dab6280de64f2c58a2c693a1528fcaf23ec5a"
    ]
  }
]

@georgi-l95
Copy link
Contributor Author

georgi-l95 commented Jul 25, 2024

Hi guys, how is this different from using the /api/v1/contracts/results/{transactionIdOrHash} endpoint?

For example, this is just a random mainnet transaction, and I can get the logs by querying the mirror node with the 32 byte Ethereum format, and I get all the logs:

⮞ curl --silent https://mainnet.mirrornode.hedera.com/api/v1/contracts/results/0xcc7bfea2d35e4bcf27bfe60d19433efa8e03f3d6fbafebe0e21c0f24bcee3d0f | jq

Hey @Neurone thanks for pointing this out. Difference here is that this endpoint is querying from contract_results table in the database, where contract/logs is querying from contract_logs table. Not all transaction event logs are logged in the contract_results table, for example FT and NFT HTS transfer and approve. Their events are only added in the latter database table.

Signed-off-by: Michael Garber <michael.garber@swirldslabs.com>
@mgarbs mgarbs merged commit d508e20 into hashgraph:main Jul 25, 2024
8 of 9 checks passed
@Neurone
Copy link
Contributor

Neurone commented Jul 26, 2024

Hi Georgi, thanks for the clarification.

I think we should take advantage of the change to match the log values in the /api/v1/contracts/results/{transactionIdOrHash} endpoint to the expected results (all logs relative to that transaction).

The DB query should be able to read this information and associate it with the result.

We can also add a /api/v1/contracts/results/{transactionIdOrHash}/logs endpoint in case the developers just want to get the logs, and in that case it would be a read from the contract_logs table only. This is exactly the behaviour we would have got with the new /api/v1/contracts/results/logs?transaction.hash={value} syntax, but now with a more coherent syntax.

This way we both cover the need to have the full log list and address the misunderstanding about data for those projects that use the logs value returned by the /api/v1/contracts/results/{transactionIdOrHash}.

If the contract_logs table contains all the logs, we can also take the opportunity to free up some space in the contract_results table.

@steven-sheehy @xin-hedera What do you think?

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

Successfully merging this pull request may close these issues.

6 participants