V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
diveinto

开源了一个以太坊的小工具,用来监听新的区块和 transaction 事件

  •  1
     
  •   diveinto · Dec 27, 2019 · 4799 views
    This topic created in 2313 days ago, the information mentioned may be changed or developed.

    不知道有没有人需要 (~~并没有~~)

    地址: https://github.com/HydroProtocol/nights-watch

    内部好几个 production 的服务用到了这个组件,对有类似需求的同学,用起来应该挺顺手的

    Supplement 1  ·  Jan 3, 2020

    方便上手,加了个 docker image,来展示这个 lib 能做些什么

    比如监控 USDT 的转账事件

    docker run diveinto/nights-watch:master /bin/nights-watch usdt-transfer
    

    usdt transfer

    更多见 help

    docker run diveinto/nights-watch:master /bin/nights-watch help
    

    Screen Shot 2020-01-03 at 10 07 16 AM

    6 replies    2020-10-16 11:13:37 +08:00
    ob
        1
    ob  
       Dec 27, 2019 via Android
    数据来源哪个节点?
    diveinto
        2
    diveinto  
    OP
       Dec 27, 2019   ❤️ 1
    @ob 需要自己配置以太坊节点,可以用 [infura]( https://infura.io/) 提供的免费节点,也可以自己跑以太坊的 Node
    ob
        3
    ob  
       Dec 27, 2019 via Android
    @diveinto 那你这个工具提供的数据 infura api 本身不都有了吗?你们内部用的场景是怎样?
    diveinto
        4
    diveinto  
    OP
       Dec 27, 2019   ❤️ 1
    比如我们需要监控特定合约里新产生的交易事件,用我们这个库只需要配置好合约地址和事件 Hash 即可,这样用这个库的人就可以专注写自己的业务逻辑。

    例如这里 https://github.com/HydroProtocol/nights-watch/blob/master/watcher_with_receipt_logs_plugin_test.go#L22:L28
    lxzhtxh13
        5
    lxzhtxh13  
       Dec 29, 2019
    看起来都好高深的样子
    pynix
        6
    pynix  
       Oct 16, 2020
    交易所充值监控。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1505 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 16:49 · PVG 00:49 · LAX 09:49 · JFK 12:49
    ♥ Do have faith in what you're doing.