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

feat(core): support for querying metadata sql #686

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

polebug
Copy link
Contributor

@polebug polebug commented Dec 24, 2024

Summary

Checklist

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

For Example:

Request Body:

{
  "action_limit": 10,
  "limit": 1,
  "metadata": {"from":{"address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}, "to": {"address":"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"}},
  "network": "ethereum",
  "since_timestamp": 0,
  "success": true,
  "tag": "exchange",
  "type": "swap",
  "until_timestamp": 0
}

Response:

{
    "data": [
        {
            "id": "0x6a0d04bc5cd8127dee3f06759920c95f32e4dc606469f776d6ce445e7b6c4b07",
            "network": "ethereum",
            "index": 91,
            "from": "0x4339889FD9dFCa20a423fbA011e9dfF1C856CAEb",
            "to": "0x9008D19f58AAbD9eD0D60971565AA8510560ab41",
            "tag": "exchange",
            "type": "swap",
            "platform": "Cow",
            "fee": {
                "amount": "2122212643560009",
                "decimal": 18
            },
            "calldata": {
                "function_hash": "0x13d79a0b"
            },
            "total_actions": 2,
            "actions": [
                {
                    "tag": "exchange",
                    "type": "swap",
                    "platform": "Cow",
                    "from": "0x40A50cf069e992AA4536211B23F286eF88752187",
                    "to": "0x40A50cf069e992AA4536211B23F286eF88752187",
                    "metadata": {
                        "from": {
                            "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
                            "value": "250000000000000000",
                            "name": "Wrapped Ether",
                            "symbol": "WETH",
                            "decimals": 18,
                            "standard": "ERC-20"
                        },
                        "to": {
                            "address": "0xB3912b20b3aBc78C15e85E13EC0bF334fbB924f7",
                            "value": "1610915268681387",
                            "name": "Hana",
                            "symbol": "HANA",
                            "decimals": 9,
                            "standard": "ERC-20"
                        }
                    },
                    "related_urls": [
                        "https://etherscan.io/tx/0x6a0d04bc5cd8127dee3f06759920c95f32e4dc606469f776d6ce445e7b6c4b07"
                    ]
                },
                {
                    "tag": "exchange",
                    "type": "swap",
                    "platform": "Cow",
                    "from": "0x80Fe65E243F0133b22d22535FABE4502bDA2B585",
                    "to": "0x80Fe65E243F0133b22d22535FABE4502bDA2B585",
                    "metadata": {
                        "from": {
                            "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
                            "value": "500000000",
                            "name": "USD Coin",
                            "symbol": "USDC",
                            "decimals": 6,
                            "standard": "ERC-20"
                        },
                        "to": {
                            "address": "0x155788DD4b3ccD955A5b2D461C7D6504F83f71fa",
                            "value": "55234309827111623",
                            "name": "KAMALA HARRIS",
                            "symbol": "HARRIS",
                            "decimals": 9,
                            "standard": "ERC-20"
                        }
                    },
                    "related_urls": [
                        "https://etherscan.io/tx/0x6a0d04bc5cd8127dee3f06759920c95f32e4dc606469f776d6ce445e7b6c4b07"
                    ]
                }
            ],
            "success": true,
            "timestamp": 1729647215
        }
    ],
    "meta": {
        "cursor": "0x6a0d04bc5cd8127dee3f06759920c95f32e4dc606469f776d6ce445e7b6c4b07:ethereum"
    }
}

@polebug polebug requested a review from brucexc December 24, 2024 15:36
@polebug polebug requested a review from pseudoyu as a code owner December 24, 2024 15:36
Copy link

commit hash: dd7b55c
openapi.yaml

Lint Result

Lint: docs/api.yaml

Severity Location Problem Message
warning line 10:10 no-server-example.com Server url should not point to example.com or localhost.

Validation successful
Warnings: 1

@polebug polebug requested a review from HenryQW December 24, 2024 15:37
Copy link

commit hash: a7ddb22
openapi.yaml

Lint Result

Lint: docs/api.yaml

Severity Location Problem Message
warning line 10:10 no-server-example.com Server url should not point to example.com or localhost.

Validation successful
Warnings: 1

Copy link
Contributor

@brucexc brucexc left a comment

Choose a reason for hiding this comment

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

LGTM

@polebug polebug merged commit 719fcbb into main Dec 30, 2024
6 of 7 checks passed
@polebug polebug deleted the feat/support-metadata-sql branch December 30, 2024 03:43
Copy link

commit hash: 719fcbb
openapi.yaml

Lint Result

Lint: docs/api.yaml

Severity Location Problem Message
warning line 10:10 no-server-example.com Server url should not point to example.com or localhost.

Validation successful
Warnings: 1

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.

2 participants