Running the RPC adapter
Instructions on how to locally run the RPC adapter
Running the RPC adapter allows for interaction with the Acala EVM+, be it with the local development network, public test network or either of the main networks.
In previous local development setup section, we run the whole stack (node + subquery + rpc adapter) with docker compose, which already includes the RPC adapter. This sections is for those who want to run the RPC adapter separately, or learn more about the RPC adapter.
Running a local mandala node
RPC adapter needs to connect to a node, so we first run a local mandala node at port 9944
Running the RPC adapter
with docker
or via npm
Flags can be appended to the command in order to adapt the default configuration to your needs. Flags are documented at the bottom of this page.
Options
Options can be passed to the RPC adapter in three ways:
As CLI options (recommended)
As environment variables
Passing the options as CLI options
Passing the options as CLI options is done by appending the values to the command when running the RPC adapter:
Passing the options as environment variables
If you wish to pass the options as environment variables in the terminal, you can add them with the export
statements, or by prepending the command used to spin up RPC adapter:
Both the environment variable that is defined by itself as well as the one defined inline with the yarn start
will be used in this case.
List of options
Please don't mix using ENVs and CLI options. CLI options are preferred, and will overwrite ENVs.
More details can also be found by npx @acala-network/eth-rpc-adapter --help
.
Using the -e
flag and passing the URL of a Mandala, Acala and Karura node allows for running the local RPC adapter while communicating with a public network.
Modes
local mode
For local testing, we usually turn this mode on, together with a local --instant-sealing
mandala node. It has some optimization to run faster with local node, and some minor bug prevention.
safe mode (deprecated)
In this mode, Txs and logs can only be found after they are finalized. Now deprecated in favor for the finalized
and safe
block tags.
Last updated