Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chains/devnet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"nonce": "0x0",
"timestamp": "0x0",
"extraData": "0x",
"gasLimit": "0x7a1200",
"gasLimit": "0x1312D00",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
Expand Down
17 changes: 8 additions & 9 deletions rpc/rpc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ def test_functionality(rpc_url):
print(f"RPC request failed, Error: {str(e)}")


def test_chain_id(rpc_url, chain_id):
def test_chain_id(rpc_url, expected_chain_id):
payload = {
"jsonrpc": "2.0",
"method": "eth_chainId",
"id": chain_id,
"params": [],
"id": 1,
}

try:
response = requests.post(rpc_url, json=payload)
response_data = response.json()
print("RPC request successful, Response Data:", response_data)
except Exception as e:
print(f"RPC request failed, Error: {str(e)}")
response = requests.post(rpc_url, json=payload)
response_data = response.json()
actual_chain_id = int(response_data["result"], 16)
assert actual_chain_id == expected_chain_id, \
f"Chain ID mismatch: expected {expected_chain_id}, got {actual_chain_id}"


if __name__ == '__main__':
Expand Down