Skip to content

Commit

Permalink
Merge pull request #402 from tellor-io/adding-frax
Browse files Browse the repository at this point in the history
Added Fraxtal Mainnet and Testnet to telliot-core
  • Loading branch information
brendaloya authored Mar 29, 2024
2 parents 935d7c0 + 1278d6f commit 11cfbae
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/telliot_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
""" Telliot """
__version__ = "0.3.2"
__version__ = "0.3.3"
2 changes: 2 additions & 0 deletions src/telliot_core/apps/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
1101: "Polygon zkEVM",
59140: "Linea Goerli",
59144: "Linea",
2522: "Fraxtal Testnet",
252: "Fraxtal Mainnet",
}

LOGLEVEL_MAP = {
Expand Down
19 changes: 14 additions & 5 deletions src/telliot_core/data/contract_directory.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@
"2442": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc",
"1101": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85",
"59140": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE",
"59144": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc"
"59144": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"2522": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE",
"252": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc"
},
"abi_file": "tellor360-oracle-abi.json"
},
Expand Down Expand Up @@ -161,7 +163,9 @@
"2442": "0x5446397292854D92872eDf426eEaB8FdC6Bd2bEa",
"1101": "0x6684E5DdbEe1b97E10847468cB5f4e38f3aB83FE",
"59140": "0xe331Afe3a8D7836bEdF1F09bC91549f4bc8c60C9",
"59144": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc"
"59144": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc",
"2522": "0xe331Afe3a8D7836bEdF1F09bC91549f4bc8c60C9",
"252": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc"
},
"abi_file": "tellor360-autopay-abi.json"
},
Expand Down Expand Up @@ -199,7 +203,9 @@
"2442": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"1101": "0x03346b2F4BC23fd7f4935f74E70c7a7FebC45313",
"59140": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"59144": "0x35482B93941B439dEA2244Cc30A20D1Ed862DF86"
"59144": "0x35482B93941B439dEA2244Cc30A20D1Ed862DF86",
"2522": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81",
"252": "0xf4Fee0A3aa10abD90b2E03Cf9aB4C221d8348157"
},
"abi_file": "trb-token-abi.json"
},
Expand Down Expand Up @@ -239,7 +245,8 @@
"84531": "0x34Fae97547E990ef0E05e05286c51E4645bf1A85",
"5001": "0x46038969D7DC0b17BC72137D07b4eDe43859DA45",
"2442": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"59140": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc"
"59140": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"2522": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81"
}
},
{
Expand Down Expand Up @@ -315,7 +322,9 @@
"2442": "0x89e44099f5E80484dcF48995080481214b9c2D7c",
"1101": "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc",
"59140": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc",
"59144": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81"
"59144": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81",
"2522": "0x9EA18BFDB50E9bb4A18F9d3Df7804E398F8fE0dc",
"252": "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81"
},
"abi_file": "tellor-governance-abi.json"
}
Expand Down
4 changes: 4 additions & 0 deletions src/telliot_core/directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def get_abi(self, chain_id: int = 0, api_key: str = "") -> list[Any]:
url = "https://goerli.lineascan.build"
elif chain_id == 59144:
url = "https://lineascan.build"
elif chain_id == 2522:
url = "https://api-holesky.fraxscan.com"
elif chain_id == 252:
url = "https://api.fraxscan.com"
else:
raise ValueError(f"Could not retrieve ABI using chain_id {chain_id}")

Expand Down
14 changes: 14 additions & 0 deletions src/telliot_core/model/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,20 @@ class Chain(Base):
network="mainnet",
currency=EVMCurrency(name="Ether", symbol="ETH", decimals=18),
),
Chain(
chain_id=2522,
name="Fraxtal Testnet",
chain="Fraxtal Testnet",
network="testnet",
currency=EVMCurrency(name="Frax Ether", symbol="frxETH", decimals=18),
),
Chain(
chain_id=252,
name="Fraxtal Mainnet",
chain="Fraxtal Mainnet",
network="mainnet",
currency=EVMCurrency(name="Frax Ether", symbol="frxETH", decimals=18),
),
]


Expand Down
14 changes: 14 additions & 0 deletions src/telliot_core/model/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,20 @@ def connect(self) -> bool:
url="https://zkevm-rpc.com",
explorer="https://zkevm.polygonscan.com/",
),
RPCEndpoint(
chain_id=2522,
provider="Fraxtal",
network="Fraxtal Testnet",
url="https://rpc.testnet.frax.com",
explorer="https://api-holesky.fraxscan.com",
),
RPCEndpoint(
chain_id=252,
provider="Fraxtal",
network="Fraxtal Mainnet",
url="https://rpc.frax.com",
explorer="https://api.fraxscan.com",
),
]


Expand Down

0 comments on commit 11cfbae

Please sign in to comment.