Mantle Node API
RPC API Reference
Mantle v2 Tectonic has been released, please move to the new documentation!
Applications need to connect to a node to fetch block data and send transactions to the Mantle network. Mantle Network shares the same JSON-RPC API implementation as Ethereum.
You can refer to the common endpoints here.
We've also introduced custom methods to simplify certain Mantle-specific interactions.
API Access
All methods can be accessed via https and websocket.
Name | Mainnet | Testnet |
---|---|---|
RPC URL | ||
Websocket URL | wss://wss.mantle.xyz | wss://ws.testnet.mantle.xyz |
The websocket supports an access method equivalent to the https interface, along with event subscription and cancellation. See here for reference.
Custom methods
Method | Description |
---|---|
Returns block info for multiple blocks, takes a block range as parameter | |
Returns L2 node info | |
eth_getBlockRange
eth_getBlockRange
Returns the block info in the form of an array of block
objects for multiple blocks within a specified range. (See eth_getBlockByHash
for the structure of a block
object)
Parameters
No. | Parameter | Type | Description |
---|---|---|---|
1 |
| Integer | String | Starting block no. of the range, or one of |
2 |
| Integer | String | Ending block no. of the range, or one of |
3 |
| Boolean | If |
Sample Request
Sample Response
rollup_getInfo
rollup_getInfo
Returns various pieces of information in the form of an Object
for a specified node.
The response Object
structure is as follows:
Field | Type | Description |
---|---|---|
| String | Node's mode of operation - |
| Boolean |
|
| Object | Nested object. Contains |
| Quantity | Block no. of the latest known L1 block |
| Quantity | Timestamp of the latest known L1 block |
| Object | Nested object. Contains |
| Quantity | Index within the CTC of the last L1 to L2 message ingested |
| Quantity | Index of the last L2 transaction processed |
| Quantity | Index of the last transaction that was ingested from a batch that was posted to L1 |
Parameters
None
Sample Request
Sample Response
rollup_gasPrices
rollup_gasPrices
Returns an Object
containing the L1 and L2 gas prices used by the Sequencer to calculate transaction gas fees.
The response Object
structure is as follows:
Field | Type | Description |
---|---|---|
| Quantity | L1 gas price in wei (used to estimate L1 calldata costs) |
| Quantity | L2 gas price in wei (used to estimate L2 execution costs) |
Parameters
None
Sample Request
Sample Response
Unsupported Methods
Method | Description |
---|---|
| Used to fetch the list of addresses owned by a user. Mantle nodes do not expose internal wallets for security reasons, and thus block the You can use an external wallet service as an alternative. |
| Mantle nodes block This is different from |
Last updated