Skip to content

Commit

Permalink
chore: add 8545 specifically for the EthRPC class.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb committed May 15, 2024
1 parent 41b5f38 commit 4b1f14f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ethereum_test_tools/rpc/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class BaseRPC:
Represents a base RPC class for every RPC call used within EEST based hive simulators.
"""

def __init__(self, client):
def __init__(self, client, port):
self.client = client
self.url = f"http://{client.ip}:8551"
self.url = f"http://{client.ip}:{port}"

@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, max=10))
def post_request(self, method, params):
Expand Down Expand Up @@ -59,6 +59,12 @@ class EthRPC(BaseRPC):
hive simulators.
"""

def __init__(self, client):
"""
Initializes the EthRPC class with the http port 8545, which requires no authentication.
"""
super().__init__(client, port=8545)

BlockNumberType = Union[int, Literal["latest", "earliest", "pending"]]

def get_block_by_number(self, block_number: BlockNumberType = "latest", full_txs: bool = True):
Expand Down

0 comments on commit 4b1f14f

Please sign in to comment.