Skip to content

Commit

Permalink
Merge pull request #705 from tellor-io/manta-and-base-goerli
Browse files Browse the repository at this point in the history
added manta testnet and base goerli
  • Loading branch information
akremstudy authored Aug 23, 2023
2 parents 654e65b + b0a2f40 commit 27d4020
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/telliot_feeds/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

POLYGON_CHAINS = {137, 80001}

ETHEREUM_CHAINS = {1, 3, 5, 10, 420, 42161, 421613, 11155111}
ETHEREUM_CHAINS = {1, 3, 5, 10, 420, 42161, 421613, 11155111, 3441005, 84531}

GNOSIS_CHAINS = {100, 10200}

Expand Down
14 changes: 14 additions & 0 deletions src/telliot_feeds/reporters/tips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ def add_multicall_support(
multicall3_address="0xcA11bde05977b3631167028862bE2a173976CA11",
)

add_multicall_support(
network="Manta Testnet",
network_id=3441005,
state_override=False,
multicall3_address="0x211B1643b95Fe76f11eD8880EE810ABD9A4cf56C",
)

add_multicall_support(
network="Base Goerli",
network_id=84531,
state_override=False,
multicall3_address="0x8252eA5560755e6707c97C72e008CF22Ce0ca85F",
)

CATALOG_QUERY_IDS = {query_catalog._entries[tag].query.query_id: tag for tag in query_catalog._entries}
CATALOG_QUERY_DATA = {query_catalog._entries[tag].query.query_data: tag for tag in query_catalog._entries}
# A list of query types that have a generic source that can take any properly formatted inputs and return a price
Expand Down
4 changes: 1 addition & 3 deletions src/telliot_feeds/sources/ampleforth/bitfinex.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ def calculate_vwap_via_all(symbol: dict[str, Any], start: int, end: int, show_de
result["source"].update(source)
result.update(p_result[i])

all_vwaps = [
v["vwap"] * v["volume"] for k, v in result.items() if k != "source" and v != NO_TRADES_FOUND # type: ignore
]
all_vwaps = [v["vwap"] * v["volume"] for k, v in result.items() if k != "source" and v != NO_TRADES_FOUND]
sum_volumes_and_prices = sum(all_vwaps)
sum_volume = sum(v["volume"] for k, v in result.items() if k != "source" and "volume" in v)

Expand Down

0 comments on commit 27d4020

Please sign in to comment.