TriportRPC

eth_call

POSThttps://triport.io/rpc/bsc

Execute a read-only EVM call.

BNB Smart Chainbsc:rpcbsc_read_rpc_heavy - 15 / 20 / 100 / 250 RPS (free / basic / pro / business) (default, unmeasured); enterprise unlimited

eth_call executes a read-only EVM message call against BNB Smart Chain state and returns the raw output bytes without creating a transaction.

Use it for contract getters, simulation, and ABI-encoded calls. The result is 0x-prefixed byte data; the caller must decode it with the target contract ABI. The optional block tag selects the state snapshot and defaults to the upstream node's current state when omitted.

Unlike eth_estimateGas, this method returns call output rather than a gas estimate. It never submits a transaction, and raw transaction submission is not exposed for BSC. Historical state is available only on the two confirmed archive-state pool nodes.

Parameters

JSON-RPC params is a positional array: [call, block?].

callobjectrequired
EVM call object to simulate; see the object fields below.
accessListarray<object>optional
EIP-2930 access-list entries; each contains address and storageKeys.
datastring (hex data)optional
ABI-encoded call data; an alternative to input.
fromstring (address)optional
Address used as the simulated sender.
gasstring (hex quantity)optional
Gas made available to the simulation.
gasPricestring (hex quantity)optional
Legacy gas-price field.
inputstring (hex data)optional
ABI-encoded call data; an alternative to data.
maxFeePerGasstring (hex quantity)optional
Maximum fee-per-gas field.
maxPriorityFeePerGasstring (hex quantity)optional
Maximum priority-fee field.
tostring (address)optional
Destination account or contract.
valuestring (hex quantity)optional
Native value supplied to the simulated call.
blockstring (block tag or hex quantity)optional
Block selector: latest, earliest, pending, or an EVM hex block number.
accessList[]object
addressstring (address)required
Account whose storage is predeclared.
storageKeysarray<string>required
32-byte storage-key hashes for that account.

Response

The response below is the checked fixture for this method; it is reproduced without changing its fields or values.

resultstring (hex data)
Raw EVM call output as hex data.

Errors

Errors use the standard JSON-RPC error envelope. See BSC errors for network-specific classification and the linked shared reference.

CodeMeaningWhen it happens
-32602Invalid paramsA required positional parameter is missing or a value does not match the OpenRPC schema.
-32000Upstream request failureInterpret the message with the code: header not found means a missing block; pruned/unsupported state text means unavailable historical state.
401UnauthorizedThe x-token API key is missing or invalid.
429Rate limitedThe request exceeds the configured category RPS for the caller's tier.

Examples

JavaScript (fetch)

const response = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: {
    "x-token": process.env.TRIPORT_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_call",
    "params": [
      {
        "to": "0x0000000000000000000000000000000000000000",
        "data": "0x"
      },
      "latest"
    ]
  }),
});


const payload = await response.json();
console.log(payload.result);

Notes

  • Historical state is confirmed on two pool nodes. A historical request can fail when no eligible archive-state node is available.
  • Treat upstream -32000 by both code and message: header not found and pruned historical state are different conditions.
  • The BSC categories use configured defaults of 15 / 20 / 100 / 250 RPS; they are marked unmeasured in the tier matrix.
  • Related methods: eth_estimateGas, eth_getCode, eth_getStorageAt.