Skip to content

Commit

Permalink
fix instantiating class
Browse files Browse the repository at this point in the history
  • Loading branch information
makemake-kbo committed Jan 3, 2024
1 parent 28a1e4f commit 2076865
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hrotti/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from fastapi import FastAPI, WebSocket

from .methods import RPCRequest, block_info, handle_request
from .methods import RPCRequest, BlockInfo, handle_request

app = FastAPI()

info = block_info(
info = BlockInfo(
head="0x5BAD55",
chain_id="0x1",
coinbase="0x407d73d8a49eeb85d32cf465507dd71d507100c1",
Expand Down
4 changes: 2 additions & 2 deletions hrotti/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RPCRequest(BaseModel):
id: int


class block_info:
class BlockInfo(BaseModel):
head: str
chain_id: str
coinbase: str
Expand Down Expand Up @@ -72,7 +72,7 @@ def return_block(head, transaction):
}


def handle_request(request: RPCRequest, info: block_info):
def handle_request(request: RPCRequest, info: BlockInfo):
try:
match request.method:
case "eth_blockNumber":
Expand Down

0 comments on commit 2076865

Please sign in to comment.