curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getSystemTxsByBlockNumber",
"params": [
"0x9d16cf"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"type": "0x7e",
"blockNumber": "0x9d16cf",
"blockHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"transactionIndex": "0x0",
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1111111111111111111111111111111111111111",
"value": "0x0",
"gasUsed": "0x5208",
"gasPrice": "0x0",
"input": "0x",
"status": "0x1"
}
]
}
Returns system transactions for a given block number on Hyperliquid EVM.
curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getSystemTxsByBlockNumber",
"params": [
"0x9d16cf"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"type": "0x7e",
"blockNumber": "0x9d16cf",
"blockHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"transactionIndex": "0x0",
"from": "0x0000000000000000000000000000000000000000",
"to": "0x1111111111111111111111111111111111111111",
"value": "0x0",
"gasUsed": "0x5208",
"gasPrice": "0x0",
"input": "0x",
"status": "0x1"
}
]
}
eth_getSystemTxsByBlockNumber
JSON-RPC method returns system transactions for a given block number on Hyperliquid EVM. This Hyperliquid-specific method provides access to internal system transactions that handle protocol operations, network maintenance, and other system-level activities.
blockNumber
(string, required) — Block identifier: "latest"
, "earliest"
, "pending"
, or a specific block number in hexadecimalhash
— System transaction hashtype
— System transaction type identifierblockNumber
— Block number containing the system transactionblockHash
— Hash of the block containing the system transactiontransactionIndex
— Index of the system transaction in the blockfrom
— System address that initiated the transactionto
— Target address of the system transactionvalue
— Value transferred in the system transactiongasUsed
— Gas used by the system transactiongasPrice
— Gas price for the system transaction (often 0 for system txs)input
— Input data for the system transactionstatus
— System transaction status (0x0 for failure, 0x1 for success)// Identify and process system transactions
const processSystemTransactions = (systemTxs) => {
return systemTxs.map(tx => ({
hash: tx.hash,
type: parseInt(tx.type, 16),
isSystemTx: true,
gasUsed: parseInt(tx.gasUsed, 16),
gasPrice: parseInt(tx.gasPrice, 16),
status: tx.status === "0x1" ? "success" : "failed",
purpose: determineSystemTxPurpose(tx.type)
}));
};
// Get system transactions by block number on Hyperliquid
const getSystemTxsByBlockNumber = async (blockNumber) => {
const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_ENDPOINT/evm', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_getSystemTxsByBlockNumber',
params: [blockNumber],
id: 1
})
});
const data = await response.json();
return data.result;
};
// Analyze system transactions from a specific block
const analyzeSystemTransactions = async (blockNumber) => {
const systemTxs = await getSystemTxsByBlockNumber(blockNumber);
if (systemTxs.length === 0) {
return {
blockNumber: parseInt(blockNumber, 16),
message: 'No system transactions in this block'
};
}
const analysis = {
blockNumber: parseInt(blockNumber, 16),
totalSystemTxs: systemTxs.length,
transactions: systemTxs.map(tx => ({
hash: tx.hash,
type: parseInt(tx.type, 16),
from: tx.from,
to: tx.to,
value: parseInt(tx.value, 16),
gasUsed: parseInt(tx.gasUsed, 16),
gasPrice: parseInt(tx.gasPrice, 16),
status: tx.status === "0x1" ? "Success" : "Failed",
index: parseInt(tx.transactionIndex, 16)
})),
summary: {
successfulTxs: systemTxs.filter(tx => tx.status === "0x1").length,
failedTxs: systemTxs.filter(tx => tx.status === "0x0").length,
totalGasUsed: systemTxs.reduce((sum, tx) => sum + parseInt(tx.gasUsed, 16), 0),
uniqueTypes: [...new Set(systemTxs.map(tx => parseInt(tx.type, 16)))]
}
};
return analysis;
};
// Monitor system transactions across a range of blocks
const monitorSystemTxsRange = async (startBlock, endBlock) => {
const results = [];
for (let i = startBlock; i <= endBlock; i++) {
const hexBlock = "0x" + i.toString(16);
try {
const systemTxs = await getSystemTxsByBlockNumber(hexBlock);
results.push({
blockNumber: i,
systemTxCount: systemTxs.length,
hasSystemTxs: systemTxs.length > 0,
types: [...new Set(systemTxs.map(tx => parseInt(tx.type, 16)))]
});
} catch (error) {
console.error(`Error processing block ${i}:`, error);
results.push({
blockNumber: i,
error: error.message
});
}
}
return {
range: { start: startBlock, end: endBlock },
results,
summary: {
totalBlocks: results.length,
blocksWithSystemTxs: results.filter(r => r.hasSystemTxs).length,
totalSystemTxs: results.reduce((sum, r) => sum + (r.systemTxCount || 0), 0)
}
};
};
// Get latest system transactions
const getLatestSystemTransactions = async () => {
return await getSystemTxsByBlockNumber('latest');
};
// Usage examples
analyzeSystemTransactions('0x9d16cf')
.then(analysis => console.log('System Transaction Analysis:', analysis))
.catch(error => console.error('Error:', error));
// Monitor recent blocks for system activity
monitorSystemTxsRange(10291248, 10291258)
.then(monitoring => console.log('System Transaction Monitoring:', monitoring))
.catch(error => console.error('Error:', error));
curl -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getSystemTxsByBlockNumber","params":["0x9d16cf"],"id":1}' \
https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm
eth_getSystemTxsByBlockNumber
method is essential for applications that need to:
Successful response with system transactions
The response is of type object
.