Skip to content

Commit

Permalink
Stop using erc20_transfers_to_order table
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIvanoff committed Jan 20, 2025
1 parent df14fb4 commit 62652c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ config :sanbase, SanbaseWeb.Plug.BasicAuth,
config :sanbase, Sanbase.RepoReader,
projects_data_endpoint_secret: {:system, "PROJECTS_DATA_ENDPOINT_SECRET"}

config :sanbase, Sanbase.Transfers.Erc20Transfers,
dt_ordered_table: {:system, "DT_ORDERED_ERC20_TRANFERS_TABLE", "erc20_transfers_dt_order"},
address_ordered_table: {:system, "ADDRESS_ORDERED_ERC20_TRANSFERS_TABLE", "erc20_transfers"}

config :sanbase, Sanbase.Price.Validator, enabled: {:system, "PRICE_VALIDATOR_ENABLED", true}

config :sanbase, Sanbase.Cryptocompare, api_key: {:system, "CRYPTOCOMPARE_API_KEY"}
Expand Down
3 changes: 1 addition & 2 deletions lib/sanbase/transfers/erc20_transfers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule Sanbase.Transfers.Erc20Transfers do
alias Sanbase.Project

alias Sanbase.Utils.Config
defp dt_ordered_table(), do: Config.module_get(__MODULE__, :dt_ordered_table)

defguard is_non_neg_integer(int) when is_integer(int) and int > 0

Expand Down Expand Up @@ -220,7 +219,7 @@ defmodule Sanbase.Transfers.Erc20Transfers do
to,
transactionHash,
(any(value) / {{decimals}}) AS value
FROM #{dt_ordered_table()}
FROM erc20_transfers
WHERE
assetRefId = cityHash64('ETH_' || {{contract}}) AND
dt >= toDateTime({{from}}) AND
Expand Down

0 comments on commit 62652c3

Please sign in to comment.