Skip to content

Commit 6e25e88

Browse files
committed
Rename contract address to oracles
1 parent 2ab8e7c commit 6e25e88

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

contracts/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
POOL_CONTRACT_ADDRESS,
1010
REWARD_ETH_CONTRACT_ADDRESS,
1111
STAKED_ETH_CONTRACT_ADDRESS,
12-
BALANCE_REPORTERS_CONTRACT_ADDRESS,
12+
ORACLES_CONTRACT_ADDRESS,
1313
)
1414

1515

@@ -51,10 +51,10 @@ def get_ownable_pausable_contract(
5151
return w3.eth.contract(abi=abi, address=contract_address)
5252

5353

54-
def get_balance_reporters_contract(w3: Web3) -> Contract:
55-
""":returns instance of `Balance Reporters` contract."""
54+
def get_oracles_contract(w3: Web3) -> Contract:
55+
""":returns instance of `Oracles` contract."""
5656
current_dir = os.path.dirname(__file__)
57-
with open(os.path.join(current_dir, "abi/IBalanceReporters.json")) as f:
57+
with open(os.path.join(current_dir, "abi/IOracles.json")) as f:
5858
abi = json.load(f)
5959

60-
return w3.eth.contract(abi=abi, address=BALANCE_REPORTERS_CONTRACT_ADDRESS)
60+
return w3.eth.contract(abi=abi, address=ORACLES_CONTRACT_ADDRESS)

contracts/abi/IBalanceReporters.json contracts/abi/IOracles.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{
3232
"indexed": true,
3333
"internalType": "address",
34-
"name": "reporter",
34+
"name": "oracle",
3535
"type": "address"
3636
},
3737
{
@@ -58,7 +58,7 @@
5858
"type": "address"
5959
}
6060
],
61-
"name": "addReporter",
61+
"name": "addOracle",
6262
"outputs": [],
6363
"stateMutability": "nonpayable",
6464
"type": "function"
@@ -99,7 +99,7 @@
9999
"inputs": [
100100
{
101101
"internalType": "address",
102-
"name": "_reporter",
102+
"name": "_oracle",
103103
"type": "address"
104104
},
105105
{
@@ -150,7 +150,7 @@
150150
"type": "address"
151151
}
152152
],
153-
"name": "isReporter",
153+
"name": "isOracle",
154154
"outputs": [
155155
{
156156
"internalType": "bool",
@@ -169,7 +169,7 @@
169169
"type": "address"
170170
}
171171
],
172-
"name": "removeReporter",
172+
"name": "removeOracle",
173173
"outputs": [],
174174
"stateMutability": "nonpayable",
175175
"type": "function"

contracts/abi/IRewardEthToken.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
},
212212
{
213213
"internalType": "address",
214-
"name": "_balanceReporters",
214+
"name": "_oracles",
215215
"type": "address"
216216
},
217217
{

src/reward_token.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from web3.types import Wei
99

1010
from contracts import (
11-
get_balance_reporters_contract,
11+
get_oracles_contract,
1212
get_pool_contract,
1313
get_reward_eth_contract,
1414
get_staked_eth_contract,
@@ -19,7 +19,7 @@
1919
from src.settings import (
2020
BEACON_CHAIN_RPC_ENDPOINT,
2121
TRANSACTION_TIMEOUT,
22-
BALANCE_REPORTERS_CONTRACT_ADDRESS,
22+
ORACLES_CONTRACT_ADDRESS,
2323
)
2424
from src.utils import (
2525
InterruptHandler,
@@ -59,13 +59,13 @@ def __init__(self, w3: Web3, interrupt_handler: InterruptHandler) -> None:
5959
f"Staked ETH Token contract address: {self.staked_eth_token.address}"
6060
)
6161

62-
self.balanceReporters = get_balance_reporters_contract(w3)
62+
self.balanceReporters = get_oracles_contract(w3)
6363
logger.debug(
6464
f"Balance Reporters contract address: {self.balanceReporters.address}"
6565
)
6666

6767
self.balanceReportersPausable = get_ownable_pausable_contract(
68-
w3, BALANCE_REPORTERS_CONTRACT_ADDRESS
68+
w3, ORACLES_CONTRACT_ADDRESS
6969
)
7070

7171
self.validator_stub = get_validator_stub(BEACON_CHAIN_RPC_ENDPOINT)

src/settings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
POOL_CONTRACT_ADDRESS: ChecksumAddress = ChecksumAddress(
6363
HexAddress(HexStr(environ["POOL_CONTRACT_ADDRESS"]))
6464
)
65-
BALANCE_REPORTERS_CONTRACT_ADDRESS: ChecksumAddress = ChecksumAddress(
66-
HexAddress(HexStr(environ["BALANCE_REPORTERS_CONTRACT_ADDRESS"]))
65+
ORACLES_CONTRACT_ADDRESS: ChecksumAddress = ChecksumAddress(
66+
HexAddress(HexStr(environ["ORACLES_CONTRACT_ADDRESS"]))
6767
)
6868
REWARD_ETH_CONTRACT_ADDRESS: ChecksumAddress = ChecksumAddress(
6969
HexAddress(HexStr(environ["REWARD_ETH_CONTRACT_ADDRESS"]))

0 commit comments

Comments
 (0)