Skip to content
Merged
214 changes: 0 additions & 214 deletions services/get-started/pricing/credit-cost.md

This file was deleted.

95 changes: 95 additions & 0 deletions services/get-started/pricing/credit-cost.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
description: API method credit cost.
---

import React from 'react';
import CreditCostTable from '@site/src/components/CreditCost/CreditCostTable.js';

# Credit costs

The following tables outline the credit costs associated with various RPC methods across different
networks. The credit calculation logic is designed to ensure accurate and fair pricing based on the
specific network and method being used.

:::caution important

Requests for [archive data](../../concepts/archive-data.md) (older than 128 blocks)
currently cost the same as non-archive data, but this might change in the near future.
:::

The process used to determine the credit cost for each request is as follows:

1. **Initial check for a specific credit value** - When you make a request, the system first checks if there is a specific credit value assigned for the network and method used.
This ensures that any unique resource requirements or costs associated with a particular network are accurately reflected.

1. **Fallback to the Ethereum method's credit value** - If no specific credit value is found for the network, the system applies the Ethereum method's credit value.
Ethereum serves as the baseline for pricing core RPC methods.

1. **Fallback to the default credit value** - If the method is not found in the Ethereum table either, the system applies a default credit value.
Initially set to 80 credits, this default value ensures all requests are accounted for, even if specific pricing information is not available.

## Error code costs

When making requests that return status code errors, some errors count towards your credit usage.

- **`429` errors**: These are not charged and can occur if you've exceeded your allowed throughput limit (requests per second).
- **`402` errors**: These are not charged and can occur if you've exceeded your allowed daily credit usage.
- **`4xx` errors**: These are errors caused by human input, and consume 5 credits.
- **`5xx` errors**: These are server errors, and do not consume any credit charges.

## Ethereum

The Ethereum methods serve as a baseline for pricing RPC methods. If a credit cost is not available for
a specific network, then use the default Ethereum method's credit cost.

### Standard Ethereum-compliant methods

<CreditCostTable methods="evm" />


### Trace methods

<CreditCostTable methods="evm_trace" />


### Filter methods

<CreditCostTable methods="evm_filter" />

### Debug methods


<CreditCostTable methods="evm_debug" />


### Subscription events

You can subscribe and unsubscribe to events using [`eth_subscribe`](../../reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx) and [`eth_unsubscribe`](../../reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx).

The credit costs for the `logs` and `newHeads` events are charged per block, whereas `newPendingTransaction` events
are charged at approximately one second intervals.

<CreditCostTable methods="evm_subscription" />

## Linea

<CreditCostTable methods="linea" />


## Polygon

<CreditCostTable methods="polygon" />

## Starknet

<CreditCostTable methods="starknet" />



## ZKsync Era

<CreditCostTable methods="zksync" />

## Gas API

<CreditCostTable methods="gasApi" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns a list of addresses owned by the client.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns a list of addresses owned by the client. <CreditCost network="evm" method="eth_accounts" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns the expected base fee for blobs in the next block.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns the expected base fee for blobs in the next block. <CreditCost network="evm" method="eth_blobbasefee" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns the current latest block number.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns the current latest block number. <CreditCost network="evm" method="eth_blockNumber" />
4 changes: 3 additions & 1 deletion services/reference/_partials/_eth_call-description.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Executes a new message call immediately without creating a transaction on the blockchain.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Executes a new message call immediately without creating a transaction on the blockchain. <CreditCost network="evm" method="eth_call" />

:::warning Gas parameter is capped

Expand Down
5 changes: 4 additions & 1 deletion services/reference/_partials/_eth_chainid-description.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by [EIP-155](https://eips.ethereum.org/EIPS/eip-155).
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced
by [EIP-155](https://eips.ethereum.org/EIPS/eip-155). <CreditCost network="evm" method="eth_chainId" />
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Creates an [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list that you can include in a [transaction](../../concepts/transaction-types.md).
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Use this method to optimize your smart contract interactions. Access lists are a part of Ethereum's EIP-2930, which aims to improve the network's scalability and reduce gas costs by specifying an explicit list of addresses and storage keys that a transaction intends to access.
Creates an [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list that you can include in a
[transaction](../../concepts/transaction-types.md). <CreditCost network="evm" method="eth_createAccessList" />

Use this method to optimize your smart contract interactions. Access lists are a part of Ethereum's
EIP-2930, which aims to improve the network's scalability and reduce gas costs by specifying an explicit
list of addresses and storage keys that a transaction intends to access.

:::tip Optimizing Ethereum Transactions

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more
than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics
and node performance. <CreditCost network="evm" method="eth_estimateGas" />

:::warning Gas parameter is capped

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns historical gas information, allowing you to track trends over time.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns historical gas information, allowing you to track trends over time. <CreditCost network="evm" method="eth_feeHistory" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns the current gas price in wei.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns the current gas price in wei. <CreditCost network="evm" method="eth_gasPrice" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns the balance of the account of a given address.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns the balance of the account of a given address. <CreditCost network="evm" method="eth_getBalance" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns information about a block given its block hash.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns information about a block given its block hash. <CreditCost network="evm" method="eth_getBlockByHash" />
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Returns information about a block given its block number.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns information about a block given its block number. <CreditCost network="evm" method="eth_getBlockByNumber" />
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Returns all transaction receipts for a given block, the amount of gas used, and any event logs that might have been produced by a smart contract during the transaction.
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns all transaction receipts for a given block, the amount of gas used, and any event logs that
might have been produced by a smart contract during the transaction. <CreditCost network="evm" method="eth_getBlockReceipts" />
Loading
Loading