Skip to content

Commit

Permalink
Merge pull request #398 from tellor-io/mantle-testnet
Browse files Browse the repository at this point in the history
Add Mantle Testnet
  • Loading branch information
0xSpuddy authored Jan 23, 2024
2 parents c280316 + b062c6d commit 99805bc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/telliot_core/apps/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
943: "pulsechain-testnet",
3441005: "manta-testnet",
84531: "base-goerli",
5001: "mantle-testnet",
}

LOGLEVEL_MAP = {
Expand Down
2 changes: 1 addition & 1 deletion src/telliot_core/contract/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

logger = logging.getLogger(__name__)

AsyncCallable = Callable[[Any], Awaitable]
AsyncCallable = Callable[[Any], Awaitable[Any]]

SubscriptionType = Literal["newHeads", "logs", "newPendingTransactions", "syncing"]

Expand Down
15 changes: 10 additions & 5 deletions src/telliot_core/data/contract_directory.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@
"369": "0xD9157453E2668B2fc45b7A803D3FEF3642430cC0",
"943": "0xD9157453E2668B2fc45b7A803D3FEF3642430cC0",
"3441005": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81",
"84531": "0x16d623f2f3AB1d58426f0402c313f1d3fdA14249"
"84531": "0x16d623f2f3AB1d58426f0402c313f1d3fdA14249",
"5001": "0xf9C672525284C76b9a7e83BE94849Af47624a2dd"
},
"abi_file": "tellor360-oracle-abi.json"
},
Expand All @@ -149,7 +150,8 @@
"369": "0x9BE9B0CFA89Ea800556C6efbA67b455D336db1D0",
"943": "0x9BE9B0CFA89Ea800556C6efbA67b455D336db1D0",
"3441005": "0x89e44099f5E80484dcF48995080481214b9c2D7c",
"84531": "0xCEBae6f5398853e7cd1E68301dA77C4B95Ae197a"
"84531": "0xCEBae6f5398853e7cd1E68301dA77C4B95Ae197a",
"5001": "0x10c9042C4BBD61E98bB2b3dfb90d127Be4328Aab"
},
"abi_file": "tellor360-autopay-abi.json"
},
Expand Down Expand Up @@ -181,7 +183,8 @@
"369": "0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0",
"943": "0x88dF592F8eb5D7Bd38bFeF7dEb0fBc02cf3778a0",
"3441005": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85"
"84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85",
"5001": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45"
},
"abi_file": "trb-token-abi.json"
},
Expand Down Expand Up @@ -218,7 +221,8 @@
"421611": "0x7B8AC044ebce66aCdF14197E8De38C1Cc802dB4A",
"10200": "0xe7147C5Ed14F545B4B17251992D1DB2bdfa26B6d",
"3441005": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85"
"84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85",
"5001": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45"
}
},
{
Expand Down Expand Up @@ -288,7 +292,8 @@
"369": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45",
"943": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45",
"84531": "0xAb0145d6aA4F799Bf7f4C0178e5393F6B5655dbf",
"3441005": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE"
"3441005": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE",
"5001": "0xFeAE6a8451e188b973F57be047d5aBE8814cC899"
},
"abi_file": "tellor-governance-abi.json"
}
Expand Down
2 changes: 2 additions & 0 deletions src/telliot_core/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def get_abi(self, chain_id: int = 0, api_key: str = "") -> list[Any]:
url = "https://manta-testnet.calderaexplorer.xyz"
elif chain_id == 84531:
url = "https://api-goerli.basescan.org/"
elif chain_id == 5001:
url = "https://explorer.testnet.mantle.xyz/"
else:
raise ValueError(f"Could not retrieve ABI using chain_id {chain_id}")

Expand Down
7 changes: 7 additions & 0 deletions src/telliot_core/model/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ class Chain(Base):
network="testnet",
currency=EVMCurrency(name="Ether", symbol="ETH", decimals=18),
),
Chain(
chain_id=5001,
name="mantle-testnet",
chain="mantle-testnet",
network="testnet",
currency=EVMCurrency(name="Mantle", symbol="MNT", decimals=18),
),
]


Expand Down
7 changes: 7 additions & 0 deletions src/telliot_core/model/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ def connect(self) -> bool:
url="https://goerli.base.org",
explorer="https://goerli.basescan.org/",
),
RPCEndpoint(
chain_id=5001,
provider="Mantle",
network="Mantle Testnet",
url="https://rpc.testnet.mantle.xyz",
explorer="https://explorer.testnet.mantle.xyz/",
),
]


Expand Down

0 comments on commit 99805bc

Please sign in to comment.