Skip to main content

日志

根据Address 获取log

返回来自某个地址的事件日志,支持按区块范围进行可选筛选。

https://gatescan.org/api
?module=logs
&action=getLogs
&address=0x94a8b59163e204102569880bf6d40dd591051938
&fromBlock=871852
&toBlock=871855
&page=1
&offset=1000
&apikey=YourApiKeyToken

浏览器 中尝试此端点。

参数描述
address要查询日志的地址的 字符串
fromBlock开始搜索日志的区块号,类型为 整数 ,例如:12878196
toBlock停止搜索日志的区块号,类型为 整数 ,例如:12879196
page页码编号,类型为 整数 ,在启用分页时使用
offset每页显示的交易数量,每次查询最多限制为 1000 条记录;如需查看更多记录,请使用 page 参数获取后续数据

根据Topics 获取log

在指定的区块范围内返回事件日志,支持按主题(topics)进行过滤。

https://gatescan.org/api
?module=logs
&action=getLogs
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic1=0x000000000000000000000000c6ef7050fbe638ffd992343c4c8271b9af605d6c
&topicOperator=and
&fromBlock=1403521
&toBlock=1403525
&page=1
&offset=1000
&apikey=YourApiKeyToken

浏览器 中尝试此端点。

参数描述
topic要查询的 topic 编号,限定为 topic0topic1topic2topic3
topicOperator当使用多个 topic 组合时的逻辑运算符,限定为 andor
fromBlock开始搜索日志的区块号,类型为 整数 ,例如:12878196
toBlock停止搜索日志的区块号,类型为 整数 ,例如:12879196
page页码编号,类型为 整数 ,在启用分页时使用
offset每页显示的交易数量,每次查询最多限制为 1000 条记录;如需查看更多记录,请使用 page 参数获取后续数据

根据Topics 和 Address 获取log

返回指定地址的事件日志,并根据主题(topics)和区块范围进行过滤。

https://gatescan.org/api
?module=logs
&action=getLogs
&address=0x94a8b59163e204102569880bf6d40dd591051938
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic1=0x000000000000000000000000c6ef7050fbe638ffd992343c4c8271b9af605d6c
&topicOperator=and,
&fromBlock=1403521
&toBlock=1403525
&page=1
&offset=1000
&apikey=YourApiKeyToken

浏览器 中尝试此端点。

参数描述
address用于指定要检索日志的地址的字符串
topic要查询的 topic 编号,限定为 topic0topic1topic2topic3
topicOperator当使用多个 topic 组合时的逻辑运算符,限定为 andor
fromBlock开始搜索日志的区块号,类型为 整数 ,例如:12878196
toBlock停止搜索日志的区块号,类型为 整数 ,例如:12879196
page页码编号,类型为 整数 ,在启用分页时使用
offset每页显示的交易数量,每次查询最多限制为 1000 条记录;如需查看更多记录,请使用 page 参数获取后续数据

最后更新于2025/06/05