Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Chris Seifert
    @seichris
    hello world
    Chris Seifert
    @seichris
    Didi
    @d10r
    Hi!
    Interesting project. However I wonder about this:
    According to the FAQ, your API can neither be self hosted nor can you tell anything about future availability / pricing.
    That means building something depending on your API would at the moment be quite a risky decision.
    Is there any plans to mitigate that insecurity / lock-in effect?
    Btw. I landed here after seeing your project on the dappcon.io agenda.
    In general I don't consider closed APIs (e.g. I wouldn't consider using the etherscan API).
    Sascha Goebel
    @saschagoebel
    Hi Again,
    we discussed this in person already, but for the record, the official answer is "we don't know yet" ;-)
    We're currently discussing different solutions like extended SLAs or making the source code available via a third party in case we're no longer around, but the current plan is to run eth.events as a free hosted service for the Ethereum community for the foreseeable future.
    Piotr Kosiński
    @kosecki123
    Hi
    is there a way to get custom events from the API? Looks like only hits I got are for ERC20 tokens.
    Sascha Goebel
    @saschagoebel
    Hi Piotr, yes, we translate all events we have an ABI for, but most contracts are currenty ERC-20 Tokens. You can find the CryptoKitties Events ( address = 0x06012c8cf97BEaD5deAe237070F9587f8E7A266d )in our Index for example
    If you have a special contract, you can always send us the ABI and we'll update our index in no time :-)
    Piotr Kosiński
    @kosecki123
    For sure, I’m the lead at ethereum-alarm-clock protocol, we would love to get the new scheduled transactions events to be indexed
    we are considering to use eth.events in our dapp to improve current scheduled transactions scanner experience: https://app.chronologic.network/transactions/scheduled
    The ABI and the code, please take a look at Etherscan here: https://etherscan.io/address/0xff5c4b7ec93dd70b862af027bb7f3d9900002c4d#code
    The good first thing would be the RequestCreated event
    Sascha Goebel
    @saschagoebel
    I just checked the index and the ABI is available and the events have been translated. A simple query would be: https://api.eth.events/es/event/search?pretty&q=address:0xFf5c4B7EC93dd70b862aF027Bb7f3D9900002c4D&access_token=<your-token-here>
    Latest 5 RequestCreated Events: https://api.eth.events/es/event/search?pretty&q=address:0xFf5c4B7EC93dd70b862aF027Bb7f3D9900002c4D%20AND%20event:RequestCreated&sort=timestamp:desc&size=5&access_token=<your-token-here>
    Piotr Kosiński
    @kosecki123
    Yay! Thanks.
    Sascha Goebel
    @saschagoebel
    My pleasure!
    Piotr Kosiński
    @kosecki123
    How to use the POST call to achieve the same result, tried this code but no results:
    curl -X POST \
      https://api.eth.events/es/event/search/ \
      -H 'Authorization: Bearer {token}' \
      -H 'Content-Type: application/json' \
      -H 'Postman-Token: 8037e5b3-0c9d-416d-8fcd-3c801f2dfda1' \
      -H 'cache-control: no-cache' \
      -d '{
      "query":{
        "bool":{
          "filter":{
            "term":{
              "address":"0xFf5c4B7EC93dd70b862aF027Bb7f3D9900002c4D"
            }
          }
        }
      }
    }’
    Sascha Goebel
    @saschagoebel
    When searching for case sensitive values, you have to use the ".raw" properties. Otherwise the fields are normalized and therefore lowercase. So, the query should look like this:
    {
        "query": {
            "bool": {
                "filter": [
                    {
                        "term": {
                            "address.raw": "0xFf5c4B7EC93dd70b862aF027Bb7f3D9900002c4D"
                        }
                    },
                    {
                        "term": {
                            "event.raw": "RequestCreated"
                        }
                    }
                ]
            }
        }
    }
    Piotr Kosiński
    @kosecki123
    @saschagoebel thanks, works !
    Piotr Kosiński
    @kosecki123

    Would it possible to add more custom events produced by Ethereum-alarm-clock? Each scheduled transaction is a separate contract deployed on the network, the are clones of this TransactionRequestCore:

    https://etherscan.io/address/0x4e201a5a5534bb334a3d7df4c82cd5db3bd82f29#code

    The events we are interested in are:

    • Aborted
    • Claimed
    • Executed
    • Cancelled
    The ABI is
    {"anonymous":false,"inputs":[{"indexed":false,"name":"reason","type":"uint8"}],"name":"Aborted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"rewardPayment","type":"uint256"},{"indexed":false,"name":"measuredGasConsumption","type":"uint256"}],"name":"Cancelled","type":"event"},{"anonymous":false,"inputs":[],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"bounty","type":"uint256"},{"indexed":false,"name":"fee","type":"uint256"},{"indexed":false,"name":"measuredGasConsumption","type":"uint256"}],"name":"Executed","type":"event”}

    The queries we are interested in most likely requires join relationship, like: give me all executed transactions, so they would need to have RequestCreated event as parent joined on the address and Executed event from child.

    I’m very noob in elastic stuff, so may get it wrong...

    Piotr Kosiński
    @kosecki123
    Maybe going with your sql db would juts work out of the box
    Sascha Goebel
    @saschagoebel
    Actually we're working on a better event translation that would support this case out of the box in Elastic as well as SQL. We're launching this some time next week. I'll ping you when it's ready.
    As for the joining, this is possible in ElasticSearch, but I guess it's just easier in SQL. Both databases hold the same data, so it's just a matter of preference.
    Jon Tompkins
    @Tompkins_Jon_twitter
    is there any larger group of sample queries? specifically i am looking to pull eth and token balances by address or contract. handling the to/from is fine but Im having trouble working out internal transactions. would be great to use an example someone has already vetted if its out there
    Sascha Goebel
    @saschagoebel

    Hi @Tompkins_Jon_twitter, as far as I know there's no ready to use example out there yet, but in SQL it might look something like this:

    SELECT
        tx,
        trace->>'action_from' AS "from",
        trace->>'action_to' AS "to",
        CAST(trace->>'action_value' AS NUMERIC) / 10^18 AS "value"
    FROM (
        SELECT 
            transaction_hash AS tx,
            jsonb_array_elements(traces) AS trace
        FROM trace
    ) AS traces
    LIMIT 10

    BUT: The SQL traces are not indexed at the moment, so searching on these values might be a bit slow (say extremely slow!) You might want to use our ElasticSearch API for traces queries instead:

    curl -X POST \
      https://api.eth.events/ethereum/ethereum/mainnet/es/trace/search/ \
      -H 'Authorization: Bearer <your-api-token>' \
      -H 'Content-Type: application/json' \
      -H 'cache-control: no-cache' \
      -d '{
        "query": {
            "bool": {
                "filter": [
                    {
                        "term": {
                            "transactionHash": "0x59e6e37f458485fd103b6bb58bf11330b812335fb8db968d74c8bdb3de13b79e"
                        }
                    },
                    {
                        "nested": {
                            "path": "trace",
                            "query": {
                                "bool": {
                                    "filter": [
                                        {
                                            "nested": {
                                                "path": "trace.action",
                                                "query": {
                                                    "bool": {
                                                        "filter": [
                                                            {
                                                                "range": {
                                                                    "trace.action.value.num": {
                                                                        "gt": 0
                                                                    }
                                                                }
                                                            }
                                                        ]
                                                    }
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        }
                    }
                ]
            }
        },
        "size": 5,
        "_source": [
            "transactionHash",
            "trace.action.from",
            "trace.action.to",
            "trace.action.value"
        ]
    }'
    Sascha Goebel
    @saschagoebel
    Hey @kosecki123 , as promised the better event translation is now in place and all historical and new events should have been translated. For example
    SELECT *
    FROM event
    WHERE address = '0xBEa01eA4bf28a582dd04EB945714a80d9F98B6a3'
    LIMIT 100
    Piotr Kosiński
    @kosecki123
    Thanks! Looks good.