Skip to content

Commit

Permalink
Merge pull request #738 from tellor-io/mantle-mainnet
Browse files Browse the repository at this point in the history
Mantle mainnet
  • Loading branch information
akremstudy authored Jan 30, 2024
2 parents fd239de + 37e1262 commit 9abb754
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
10 changes: 6 additions & 4 deletions docs/add-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

### Steps
1. Skip this entire first step if your chain is listed [here](https://github.com/mds1/multicall#multicall3-contract-addresses). If your chain was not listed at that link (already supported in the multicall package), then deploy your own Multicall contract on your new chain, and after, update `src/telliot_feeds/reporters/tips/__init__.py` to include that contract's address. Again, skip this step if your chain is listed [here](https://github.com/mds1/multicall#multicall3-contract-addresses).
2. Add chain ID to `AUTOPAY_CHAINS` constant in `src/telliot_feeds/reporters/reporter_autopay_utils.py`.
3. Make sure there's a datafeed for the chain's native token in `src/telliot_feeds/feeds/`. If there isn't, add one by following the steps [here](https://tellor-io.github.io/telliot-feeds/add-spot-price/).
4. Support profit checks by updating `get_native_token_feed` in `src/telliot_feeds/utils/reporter_utils.py` to return the datafeed for your new chain's native token.
5. Once you've done a new release of `telliot-core`, update that dependency in this package's `setup.cfg` to the new version.
2. Check if there is a a previously defined feed for the new chain's native token price defined in `src/telliot_feeds/feeds/`. If there is not, add the feed by following the steps [here](https://tellor-io.github.io/telliot-feeds/add-spot-price/).
3. Add the new network ID to the appropriate list in `src/telliot_feeds/constants.py`.
4. If the chain uses a different native token from any of the other networks listed, add the set of chain ids that will use the same native token. E.g.:
`MANTLE_CHAINS = {5001, 5000}`
5. Add your network to `src.telliot_feeds.utils.reporter_utils.get_native_token_feed` and `src.telliot_feeds.utils.reporter_utils.tkn_symbol` (if not already there).
6. Once you've done a new release of `telliot-core`, update that dependency in this package's `setup.cfg` to the new version.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ install_requires =
rlp==2.0.1
simple-term-menu==1.5.2
six==1.16.0
telliot-core==0.3.0
telliot-core==0.3.1
toolz==0.12.0
typing_extensions==4.4.0
urllib3==1.26.12
Expand Down
2 changes: 1 addition & 1 deletion src/telliot_feeds/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.14"
__version__ = "0.1.15"
7 changes: 7 additions & 0 deletions src/telliot_feeds/reporters/tips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ def add_multicall_support(
multicall3_address="0xbc3295180704476e4D40400b39d1d75892D91327",
)

add_multicall_support(
network="Mantle",
network_id=5000,
state_override=False,
multicall3_address="0x5Dbd743481a4027d6632E169592860a1Ca38C637",
)

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

0 comments on commit 9abb754

Please sign in to comment.