Last active
August 6, 2023 14:52
-
-
Save vnegi10/281a691a52ca25d0d90bae542efb40cf to your computer and use it in GitHub Desktop.
This file contains 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
function get_hist_gas_usage() | |
gas_pointer_dict = get_request(GAS_POINTER) | |
page_end = (gas_pointer_dict["value"] / 32) |> ceil |> Int | |
all_gas = DataFrame[] | |
for page = 1:page_end | |
gas_usage_dict = get_request(gas_usage_ep(page)) | |
df_gas = vcat(DataFrame.(gas_usage_dict["value"])...) | |
push!(all_gas, df_gas) | |
end | |
df_all_gas = vcat(all_gas...) | |
return filter(row -> row.d != "255-256-65535", df_all_gas) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment