Using the new rpc cheatcode a new rpc module can be created. This module can include a call function that accepts a method name and a Json object or a Json string as parameters and return the raw data. Specific methods can be added to let users interact with an rpc in a more convenient way, for example the module can have a ethGasPrice function that calls the eth_gasPrice rpc method and return the integer instead of the raw data
Using the new
rpc cheatcode
a newrpc
module can be created. This module can include acall
function that accepts amethod
name and a Json object or a Json string as parameters and return the raw data. Specific methods can be added to let users interact with an rpc in a more convenient way, for example the module can have aethGasPrice
function that calls theeth_gasPrice
rpc method and return the integer instead of the raw data