From 2717e5f620360b2f53fe7ce8120ce06bf4f2d654 Mon Sep 17 00:00:00 2001 From: spuddyminer Date: Mon, 21 Aug 2023 14:16:56 -0400 Subject: [PATCH 1/3] added manta testnet and base goerli --- src/telliot_core/apps/core.py | 2 ++ src/telliot_core/data/contract_directory.json | 16 ++++++++++++---- src/telliot_core/directory.py | 4 ++++ src/telliot_core/model/chain.py | 14 ++++++++++++++ src/telliot_core/model/endpoints.py | 14 ++++++++++++++ 5 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/telliot_core/apps/core.py b/src/telliot_core/apps/core.py index a503085f..80fefb85 100644 --- a/src/telliot_core/apps/core.py +++ b/src/telliot_core/apps/core.py @@ -52,6 +52,8 @@ 11155111: "sepolia", 369: "pulsechain", 943: "pulsechain-testnet", + 3441005: "manta-testnet", + 84531: "base-goerli", } LOGLEVEL_MAP = { diff --git a/src/telliot_core/data/contract_directory.json b/src/telliot_core/data/contract_directory.json index 9a773504..914b6b2a 100644 --- a/src/telliot_core/data/contract_directory.json +++ b/src/telliot_core/data/contract_directory.json @@ -120,7 +120,9 @@ "314": "0xb2CB696fE5244fB9004877e58dcB680cB86Ba444", "11155111": "0x199839a4907ABeC8240D119B606C98c405Bb0B33", "369": "0xD9157453E2668B2fc45b7A803D3FEF3642430cC0", - "943": "0xD9157453E2668B2fc45b7A803D3FEF3642430cC0" + "943": "0xD9157453E2668B2fc45b7A803D3FEF3642430cC0", + "3441005": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81", + "84531": "0x16d623f2f3AB1d58426f0402c313f1d3fdA14249" }, "abi_file": "tellor360-oracle-abi.json" }, @@ -145,7 +147,9 @@ "314": "0x60cBf3991F05a0671250e673Aa166e9D1A0C662E", "11155111": "0x7E7b96d13D75bc7DaF270A491e2f1e571147d4DA", "369": "0x9BE9B0CFA89Ea800556C6efbA67b455D336db1D0", - "943": "0x9BE9B0CFA89Ea800556C6efbA67b455D336db1D0" + "943": "0x9BE9B0CFA89Ea800556C6efbA67b455D336db1D0", + "3441005": "0x89e44099f5E80484dcF48995080481214b9c2D7c", + "84531": "0xCEBae6f5398853e7cd1E68301dA77C4B95Ae197a" }, "abi_file": "tellor360-autopay-abi.json" }, @@ -175,7 +179,9 @@ "314": "0x045CE60839d108B43dF9e703d4b25402a6a28a0d", "11155111": "0x80fc34a2f9FfE86F41580F47368289C402DEc660", "369": "0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0", - "943": "0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0" + "943": "0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0", + "3441005": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc", + "84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85" }, "abi_file": "trb-token-abi.json" }, @@ -210,7 +216,9 @@ "80001": "0x7B8AC044ebce66aCdF14197E8De38C1Cc802dB4A", "1666700000": "0x7B8AC044ebce66aCdF14197E8De38C1Cc802dB4A", "421611": "0x7B8AC044ebce66aCdF14197E8De38C1Cc802dB4A", - "10200": "0xe7147C5Ed14F545B4B17251992D1DB2bdfa26B6d" + "10200": "0xe7147C5Ed14F545B4B17251992D1DB2bdfa26B6d", + "3441005": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc", + "84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85" } }, { diff --git a/src/telliot_core/directory.py b/src/telliot_core/directory.py index 6a74a512..6559a43a 100644 --- a/src/telliot_core/directory.py +++ b/src/telliot_core/directory.py @@ -77,6 +77,10 @@ def get_abi(self, chain_id: int = 0, api_key: str = "") -> list[Any]: url = "https://filfox.info/en" elif chain_id == 11155111: url = "https://api-sepolia.etherscan.io" + elif chain_id == 3441005: + url = "https://manta-testnet.calderaexplorer.xyz" + elif chain_id == 84531: + url = "https://api-goerli.basescan.org/" else: raise ValueError(f"Could not retrieve ABI using chain_id {chain_id}") diff --git a/src/telliot_core/model/chain.py b/src/telliot_core/model/chain.py index ea29c77d..6033a868 100644 --- a/src/telliot_core/model/chain.py +++ b/src/telliot_core/model/chain.py @@ -171,6 +171,20 @@ class Chain(Base): network="testnet", currency=EVMCurrency(name="PulseChain tPLS", symbol="tPLS", decimals=18), ), + Chain( + chain_id=3441005, + name="manta-testnet", + chain="manta-testnet", + network="testnet", + currency=EVMCurrency(name="Ether", symbol="ETH", decimals=18), + ), + Chain( + chain_id=84531, + name="base-goerli", + chain="base-goerli", + network="testnet", + currency=EVMCurrency(name="Ether", symbol="ETH", decimals=18), + ), ] diff --git a/src/telliot_core/model/endpoints.py b/src/telliot_core/model/endpoints.py index fd206b0a..3a37f9ee 100644 --- a/src/telliot_core/model/endpoints.py +++ b/src/telliot_core/model/endpoints.py @@ -241,6 +241,20 @@ def connect(self) -> bool: url="https://rpc.v4.testnet.pulsechain.com", explorer="https://scan.v4.testnet.pulsechain.com/", ), + RPCEndpoint( + chain_id=3441005, + provider="caldera", + network="manta-testnet", + url="https://manta-testnet.calderachain.xyz/http", + explorer="https://manta-testnet.calderaexplorer.xyz/", + ), + RPCEndpoint( + chain_id=84531, + provider="Base", + network="Base Goerli", + url="https://goerli.base.org", + explorer="https://goerli.basescan.org/", + ), ] From f4497230e2a86d66c9cb7f09088534b2ffccac9a Mon Sep 17 00:00:00 2001 From: akrem Date: Wed, 23 Aug 2023 07:27:29 -0400 Subject: [PATCH 2/3] fix test --- src/telliot_core/gas/legacy_gas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telliot_core/gas/legacy_gas.py b/src/telliot_core/gas/legacy_gas.py index c03d4730..4b5ddcfd 100644 --- a/src/telliot_core/gas/legacy_gas.py +++ b/src/telliot_core/gas/legacy_gas.py @@ -75,7 +75,7 @@ async def legacy_gas_station( chain_id: int, speed_parse_lis: Optional[list[Union[str, int, ethgastypes]]] = None, retries: int = 2 ) -> Optional[int]: """Fetch gas price from gas station Api in gwei""" - + prices = {} if chain_id not in gas_station: logger.error(f"Please add gas station API for chain id: {chain_id}") return None From 79401b7ed235bfa6660e724d9d6eafcd30ffd527 Mon Sep 17 00:00:00 2001 From: akrem Date: Wed, 23 Aug 2023 07:39:12 -0400 Subject: [PATCH 3/3] add gov address --- src/telliot_core/data/contract_directory.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/telliot_core/data/contract_directory.json b/src/telliot_core/data/contract_directory.json index 914b6b2a..7b95b63c 100644 --- a/src/telliot_core/data/contract_directory.json +++ b/src/telliot_core/data/contract_directory.json @@ -286,7 +286,9 @@ "314": "0xb55bB55f7D8b4F26Bd18198088C96488D95cab39", "11155111": "0x8C9057FA16D3Debb703ADBac0A097d2E5577AA6b", "369": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45", - "943": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45" + "943": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45", + "84531": "0xAb0145d6aA4F799Bf7f4C0178e5393F6B5655dbf", + "3441005": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE" }, "abi_file": "tellor-governance-abi.json" }