Running the Server
Enable Server
To enable RPC server use the following flag (set to true by default).
Defining Namespaces
Eth
,Net
and Web3
namespaces are enabled by default. In order to enable other namespaces use flag --json-rpc.api
.
Set a Gas Cap
eth_call
and eth_estimateGas
define a global gas cap over rpc for DoS protection. You can override the default gas cap value of 25,000,000 by passing a custom value when starting the node:
CORS
If accessing the RPC from a browser, CORS will need to be enabled with the appropriate domain set. Otherwise, JavaScript calls are limit by the same-origin policy and requests will fail.
The CORS setting can be updated from the app.toml
:
Last updated