A Python library for interacting with Ethereum blockchain
Overall
score
88%
Evaluation — 88%
↑ 1.01xAgent success when using this tile
Implement a request logging system for Ethereum JSON-RPC calls that tracks all requests and responses through a custom middleware component.
Create a middleware component that:
The middleware should capture:
Implement a RequestLogger class with:
get_middleware() that returns the middleware functionget_request_count() that returns the total number of requests madeget_call_history() that returns a list of all logged callsEach entry in the call history should be a dictionary containing:
method: the JSON-RPC method nameparams: the request parametersresponse: the response datatimestamp: ISO format timestamp stringSetup:
Expected:
Setup:
Expected:
Setup:
Expected:
A Python library for interacting with Ethereum blockchain, providing middleware support for request pipeline customization.
Create the following files:
Implement the RequestLogger class with the required methods.
Implement the test cases to verify the middleware functionality.
Install with Tessl CLI
npx tessl i tessl/pypi-web3docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10