JSON-RPC API
eth
Blocks, transactions, accounts and contract calls.
The eth namespace is the standard Ethereum API. Full parameter details are in the Ethereum JSON-RPC specification.
Common methods
| Method | Returns |
|---|---|
eth_chainId | Chain ID (0x1e8 = 488) |
eth_blockNumber | Latest block number |
eth_getBlockByNumber | A block by number, or "latest" |
eth_getBlockByHash | A block by hash |
eth_getBalance | Balance of an address, in wei |
eth_getTransactionCount | Nonce of an address |
eth_getTransactionByHash | A transaction |
eth_getTransactionReceipt | Receipt, status and logs of a mined transaction |
eth_call | Result of a read-only contract call |
eth_estimateGas | Gas a transaction would use |
eth_gasPrice | Current gas price, in wei |
eth_feeHistory | Base fee and gas use of recent blocks |
eth_getLogs | Event logs matching a filter |
eth_getCode | Contract bytecode at an address |
eth_sendRawTransaction | Hash of a signed transaction you submit |
eth_syncing | false when the node is in sync |
Fees on BXN
BXN has a zero base fee (zeroBaseFee in the genesis), so baseFeePerGas is always 0x0. The fee you pay is the gas price.
curl -s -X POST https://rpc.blackfort.network/mainnet/rpc \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}'{"jsonrpc":"2.0","id":1,"result":"0xe8d4a51000"}0xe8d4a51000 is 1,000 gwei.
Example: get a balance
curl -s -X POST https://rpc.blackfort.network/mainnet/rpc \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xYourAddress","latest"],"id":1}'The result is in wei (1 BXN = 1018 wei).
Not available on public endpoints
eth_subscribe and eth_unsubscribe need WebSocket, which the public endpoints do not offer. Poll eth_blockNumber or eth_getLogs instead.