This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyProject.Ethereum.AwsNode do | |
use Ethereumex.Client.BaseClient | |
alias Ethereumex.Config | |
@type opt :: {:url, String.t()} | |
@type empty_response :: :empty_response | |
@type invalid_json :: {:invalid_json, any()} | |
@type http_client_error :: {:error, empty_response() | invalid_json() | any()} | |
@spec post_request(binary(), [opt()]) :: {:ok, any()} | http_client_error() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
transaction_hash, | |
topics [SAFE_OFFSET(1)] AS from_address, | |
topics [SAFE_OFFSET(2)] AS to_address, | |
address AS contract | |
FROM | |
`bigquery-public-data.crypto_ethereum.logs` | |
WHERE | |
topics [SAFE_OFFSET(0)] = "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0" | |
AND DATE(block_timestamp) = "2022-08-12" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH votes as ( | |
SELECT | |
tl.topic1 as voter_address, | |
-- data is non dynamic for CastVote, so we can safely slice the uint8 out. | |
substring(tl.data, 64, 1) as support, | |
tl.block_number as block_number | |
FROM | |
transaction_log AS tl | |
WHERE | |
-- CAST VOTE LOG |
OlderNewer