Skip to content

Commit 52cf655

Browse files
authored
remove deprecated fields (#186)
### TL;DR Removed deprecated fields from transaction and log models. ### What changed? - Removed deprecated fields from transaction and log models: - Removed `decodedData` field (replaced by `decoded`) - Removed `indexedParams` and `nonIndexedParams` (replaced by `indexed_params` and `non_indexed_params`) - Updated Swagger documentation to reflect these changes ### How to test? Verify the response contains transaction data in the updated format without deprecated fields ### Why make this change? This improves API consistency and reduces response payload size by eliminating duplicate data that was previously included for backward compatibility.
2 parents f7f74cd + 798064b commit 52cf655

File tree

5 files changed

+351
-84
lines changed

5 files changed

+351
-84
lines changed

docs/docs.go

Lines changed: 126 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,132 @@ const docTemplate = `{
14501450
}
14511451
}
14521452
}
1453+
},
1454+
"/{chainId}/wallet-transactions": {
1455+
"get": {
1456+
"security": [
1457+
{
1458+
"BasicAuth": []
1459+
}
1460+
],
1461+
"description": "Retrieve all incoming and outgoing transactions for a specific wallet address",
1462+
"consumes": [
1463+
"application/json"
1464+
],
1465+
"produces": [
1466+
"application/json"
1467+
],
1468+
"tags": [
1469+
"wallet"
1470+
],
1471+
"summary": "Get wallet transactions",
1472+
"parameters": [
1473+
{
1474+
"type": "string",
1475+
"description": "Chain ID",
1476+
"name": "chainId",
1477+
"in": "path",
1478+
"required": true
1479+
},
1480+
{
1481+
"type": "string",
1482+
"description": "Wallet address",
1483+
"name": "wallet_address",
1484+
"in": "path",
1485+
"required": true
1486+
},
1487+
{
1488+
"type": "string",
1489+
"description": "Filter parameters",
1490+
"name": "filter",
1491+
"in": "query"
1492+
},
1493+
{
1494+
"type": "string",
1495+
"description": "Field to group results by",
1496+
"name": "group_by",
1497+
"in": "query"
1498+
},
1499+
{
1500+
"type": "string",
1501+
"description": "Field to sort results by",
1502+
"name": "sort_by",
1503+
"in": "query"
1504+
},
1505+
{
1506+
"type": "string",
1507+
"description": "Sort order (asc or desc)",
1508+
"name": "sort_order",
1509+
"in": "query"
1510+
},
1511+
{
1512+
"type": "integer",
1513+
"description": "Page number for pagination",
1514+
"name": "page",
1515+
"in": "query"
1516+
},
1517+
{
1518+
"type": "integer",
1519+
"default": 5,
1520+
"description": "Number of items per page",
1521+
"name": "limit",
1522+
"in": "query"
1523+
},
1524+
{
1525+
"type": "boolean",
1526+
"description": "Force consistent data at the expense of query speed",
1527+
"name": "force_consistent_data",
1528+
"in": "query"
1529+
},
1530+
{
1531+
"type": "boolean",
1532+
"description": "Decode transaction data",
1533+
"name": "decode",
1534+
"in": "query"
1535+
}
1536+
],
1537+
"responses": {
1538+
"200": {
1539+
"description": "OK",
1540+
"schema": {
1541+
"allOf": [
1542+
{
1543+
"$ref": "#/definitions/api.QueryResponse"
1544+
},
1545+
{
1546+
"type": "object",
1547+
"properties": {
1548+
"data": {
1549+
"type": "array",
1550+
"items": {
1551+
"$ref": "#/definitions/common.DecodedTransactionModel"
1552+
}
1553+
}
1554+
}
1555+
}
1556+
]
1557+
}
1558+
},
1559+
"400": {
1560+
"description": "Bad Request",
1561+
"schema": {
1562+
"$ref": "#/definitions/api.Error"
1563+
}
1564+
},
1565+
"401": {
1566+
"description": "Unauthorized",
1567+
"schema": {
1568+
"$ref": "#/definitions/api.Error"
1569+
}
1570+
},
1571+
"500": {
1572+
"description": "Internal Server Error",
1573+
"schema": {
1574+
"$ref": "#/definitions/api.Error"
1575+
}
1576+
}
1577+
}
1578+
}
14531579
}
14541580
},
14551581
"definitions": {
@@ -1604,18 +1730,12 @@ const docTemplate = `{
16041730
"common.DecodedLogDataModel": {
16051731
"type": "object",
16061732
"properties": {
1607-
"indexedParams": {
1608-
"type": "object"
1609-
},
16101733
"indexed_params": {
16111734
"type": "object"
16121735
},
16131736
"name": {
16141737
"type": "string"
16151738
},
1616-
"nonIndexedParams": {
1617-
"type": "object"
1618-
},
16191739
"non_indexed_params": {
16201740
"type": "object"
16211741
},
@@ -1648,14 +1768,6 @@ const docTemplate = `{
16481768
"decoded": {
16491769
"$ref": "#/definitions/common.DecodedLogDataModel"
16501770
},
1651-
"decodedData": {
1652-
"description": "Deprecated: Use Decoded field instead",
1653-
"allOf": [
1654-
{
1655-
"$ref": "#/definitions/common.DecodedLogDataModel"
1656-
}
1657-
]
1658-
},
16591771
"log_index": {
16601772
"type": "integer"
16611773
},
@@ -1724,14 +1836,6 @@ const docTemplate = `{
17241836
"decoded": {
17251837
"$ref": "#/definitions/common.DecodedTransactionDataModel"
17261838
},
1727-
"decodedData": {
1728-
"description": "Deprecated: Use Decoded field instead",
1729-
"allOf": [
1730-
{
1731-
"$ref": "#/definitions/common.DecodedTransactionDataModel"
1732-
}
1733-
]
1734-
},
17351839
"effective_gas_price": {
17361840
"type": "string"
17371841
},

docs/swagger.json

Lines changed: 126 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,132 @@
14431443
}
14441444
}
14451445
}
1446+
},
1447+
"/{chainId}/wallet-transactions": {
1448+
"get": {
1449+
"security": [
1450+
{
1451+
"BasicAuth": []
1452+
}
1453+
],
1454+
"description": "Retrieve all incoming and outgoing transactions for a specific wallet address",
1455+
"consumes": [
1456+
"application/json"
1457+
],
1458+
"produces": [
1459+
"application/json"
1460+
],
1461+
"tags": [
1462+
"wallet"
1463+
],
1464+
"summary": "Get wallet transactions",
1465+
"parameters": [
1466+
{
1467+
"type": "string",
1468+
"description": "Chain ID",
1469+
"name": "chainId",
1470+
"in": "path",
1471+
"required": true
1472+
},
1473+
{
1474+
"type": "string",
1475+
"description": "Wallet address",
1476+
"name": "wallet_address",
1477+
"in": "path",
1478+
"required": true
1479+
},
1480+
{
1481+
"type": "string",
1482+
"description": "Filter parameters",
1483+
"name": "filter",
1484+
"in": "query"
1485+
},
1486+
{
1487+
"type": "string",
1488+
"description": "Field to group results by",
1489+
"name": "group_by",
1490+
"in": "query"
1491+
},
1492+
{
1493+
"type": "string",
1494+
"description": "Field to sort results by",
1495+
"name": "sort_by",
1496+
"in": "query"
1497+
},
1498+
{
1499+
"type": "string",
1500+
"description": "Sort order (asc or desc)",
1501+
"name": "sort_order",
1502+
"in": "query"
1503+
},
1504+
{
1505+
"type": "integer",
1506+
"description": "Page number for pagination",
1507+
"name": "page",
1508+
"in": "query"
1509+
},
1510+
{
1511+
"type": "integer",
1512+
"default": 5,
1513+
"description": "Number of items per page",
1514+
"name": "limit",
1515+
"in": "query"
1516+
},
1517+
{
1518+
"type": "boolean",
1519+
"description": "Force consistent data at the expense of query speed",
1520+
"name": "force_consistent_data",
1521+
"in": "query"
1522+
},
1523+
{
1524+
"type": "boolean",
1525+
"description": "Decode transaction data",
1526+
"name": "decode",
1527+
"in": "query"
1528+
}
1529+
],
1530+
"responses": {
1531+
"200": {
1532+
"description": "OK",
1533+
"schema": {
1534+
"allOf": [
1535+
{
1536+
"$ref": "#/definitions/api.QueryResponse"
1537+
},
1538+
{
1539+
"type": "object",
1540+
"properties": {
1541+
"data": {
1542+
"type": "array",
1543+
"items": {
1544+
"$ref": "#/definitions/common.DecodedTransactionModel"
1545+
}
1546+
}
1547+
}
1548+
}
1549+
]
1550+
}
1551+
},
1552+
"400": {
1553+
"description": "Bad Request",
1554+
"schema": {
1555+
"$ref": "#/definitions/api.Error"
1556+
}
1557+
},
1558+
"401": {
1559+
"description": "Unauthorized",
1560+
"schema": {
1561+
"$ref": "#/definitions/api.Error"
1562+
}
1563+
},
1564+
"500": {
1565+
"description": "Internal Server Error",
1566+
"schema": {
1567+
"$ref": "#/definitions/api.Error"
1568+
}
1569+
}
1570+
}
1571+
}
14461572
}
14471573
},
14481574
"definitions": {
@@ -1597,18 +1723,12 @@
15971723
"common.DecodedLogDataModel": {
15981724
"type": "object",
15991725
"properties": {
1600-
"indexedParams": {
1601-
"type": "object"
1602-
},
16031726
"indexed_params": {
16041727
"type": "object"
16051728
},
16061729
"name": {
16071730
"type": "string"
16081731
},
1609-
"nonIndexedParams": {
1610-
"type": "object"
1611-
},
16121732
"non_indexed_params": {
16131733
"type": "object"
16141734
},
@@ -1641,14 +1761,6 @@
16411761
"decoded": {
16421762
"$ref": "#/definitions/common.DecodedLogDataModel"
16431763
},
1644-
"decodedData": {
1645-
"description": "Deprecated: Use Decoded field instead",
1646-
"allOf": [
1647-
{
1648-
"$ref": "#/definitions/common.DecodedLogDataModel"
1649-
}
1650-
]
1651-
},
16521764
"log_index": {
16531765
"type": "integer"
16541766
},
@@ -1717,14 +1829,6 @@
17171829
"decoded": {
17181830
"$ref": "#/definitions/common.DecodedTransactionDataModel"
17191831
},
1720-
"decodedData": {
1721-
"description": "Deprecated: Use Decoded field instead",
1722-
"allOf": [
1723-
{
1724-
"$ref": "#/definitions/common.DecodedTransactionDataModel"
1725-
}
1726-
]
1727-
},
17281832
"effective_gas_price": {
17291833
"type": "string"
17301834
},

0 commit comments

Comments
 (0)