From 9c0ddc357a436eb0a3f782ca17f785ea91005987 Mon Sep 17 00:00:00 2001
From: BitWonka <79578887+BitWonka@users.noreply.github.com>
Date: Wed, 19 Feb 2025 20:53:14 +0200
Subject: [PATCH 1/2] add token1155tx api v1 endpoint
---
devs/apis/rpc/account.md | 70 ++++++++++++++++++++++++++++++++++++++--
1 file changed, 67 insertions(+), 3 deletions(-)
diff --git a/devs/apis/rpc/account.md b/devs/apis/rpc/account.md
index 8c7e4146..5d991b0f 100644
--- a/devs/apis/rpc/account.md
+++ b/devs/apis/rpc/account.md
@@ -441,11 +441,75 @@ https://instance_base_url/api
{% endtab %}
{% endtabs %}
+## Get ERC-1155 token transfer events by address
+
+`token1155tx`
+
+**Example:**
+
+```
+https://instance_base_url/api
+ ?module=account
+ &action=token1155tx
+ &address={addressHash}
+ &page=1
+ &offset=10
+ &sort=asc
+```
+
+{% tabs %}
+{% tab title="Request Params" %}
+| Parameter | Description |
+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **address** | `string` containing the address hash. |
+| contractaddress | optional `string` with the token contract address to identify a contract. |
+| sort | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. |
+| startblock | optional `integer` block number to start transaction search |
+| endblock | optional `integer` block number to stop transaction search. |
+| page | optional `integer` representing the page number used for pagination. `offset` must also be provided. |
+| offset | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
+{% endtab %}
+
+{% tab title="Example Result" %}
+```
+{
+ "message": "OK",
+ "result": [
+ {
+ "tokenValue": "1",
+ "blockHash": "0x6e3c72d61ac3009270858dc9b948e5d0aef02f2a2fb4d65ea304962133e2591a",
+ "blockNumber": "15553171",
+ "confirmations": "55352",
+ "contractAddress": "0xb989e514980dc837fd554f1f85673b0091cf25f3",
+ "cumulativeGasUsed": "421864",
+ "from": "0x0000000000000000000000000000000000000000",
+ "gas": "584001",
+ "gasPrice": "1100253",
+ "gasUsed": "375795",
+ "hash": "0x3b3f4c5bdbdeda6e59320bde3b1c255688f844f4f7b188547a858c1dfcec5139",
+ "input": "deprecated",
+ "logIndex": "3",
+ "nonce": "57",
+ "timeStamp": "1737917053",
+ "to": "0x00ef535671bb9c13d195c5cc2fa3a65f522b764a",
+ "tokenDecimal": "0",
+ "tokenID": "16094937632875098518315637340985289426529430752651125844878390853242354271202",
+ "tokenName": "Frax Name",
+ "tokenSymbol": null,
+ "transactionIndex": "1"
+ }
+ ],
+ "status": "1"
+}
+```
+{% endtab %}
+{% endtabs %}
+
Usage:
-* To fetch ERC-721 token transfers by address, specify `address` parameter
-* To fetch ERC-721 token transfers by token, specify `contractaddress` parameter
-* To fetch ERC-721 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
+* To fetch ERC-1155 token transfers by address, specify `address` parameter
+* To fetch ERC-1155 token transfers by token, specify `contractaddress` parameter
+* To fetch ERC-1155 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
## Get token account balance for token contract address
From 3a25f1bda9bee641a0b2da373139fd4bce24f12a Mon Sep 17 00:00:00 2001
From: BitWonka <79578887+BitWonka@users.noreply.github.com>
Date: Wed, 19 Feb 2025 20:57:18 +0200
Subject: [PATCH 2/2] small fix for useage
---
devs/apis/rpc/account.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/devs/apis/rpc/account.md b/devs/apis/rpc/account.md
index 5d991b0f..4bac8600 100644
--- a/devs/apis/rpc/account.md
+++ b/devs/apis/rpc/account.md
@@ -441,6 +441,12 @@ https://instance_base_url/api
{% endtab %}
{% endtabs %}
+Usage:
+
+* To fetch ERC-721 token transfers by address, specify `address` parameter
+* To fetch ERC-721 token transfers by token, specify `contractaddress` parameter
+* To fetch ERC-721 token transfers by address filtered by token, specify both `address` and `contractaddress` parameters
+
## Get ERC-1155 token transfer events by address
`token1155tx`