Filecoin (FIL)

Filecoin is a decentralized storage network whose blockchain coordinates a market for verifiable data storage, secured by Proof-of-Replication and Proof-of-Spacetime. The native token FIL pays for storage and gas fees; its base unit is the attoFIL (1 FIL = 10^18 attoFIL). Blocks are produced in ~30-second epochs, and the chain state is organized around tipsets and content-addressed CIDs.

GetBlock exposes Filecoin through two JSON-RPC surfaces:

  • The native Lotus API (Filecoin.* methods) for chain, state, wallet, message pool, and gas operations.
  • The FEVM API (eth_* methods) for the Filecoin EVM, an EVM-compatible runtime with chain ID 314.

Interfaces

InterfaceMethodsUse it for
Native (Lotus)Filecoin.<Method>Filecoin-native data: tipsets, actors, miners, messages, wallet balances
FEVM (EVM)eth_*EVM smart contracts on the Filecoin EVM (Solidity, ethers.js, viem)

Both surfaces are served over JSON-RPC 2.0 at the same endpoint; the method name selects the surface. Native methods use Filecoin address forms (f0/f1/f2/f3/f4) and CIDs; the FEVM layer uses 0x addresses and standard Ethereum types. An f4 address and its 0x form refer to the same account across the two surfaces.

Key Features

  • Decentralized Storage: A market for verifiable storage secured by Proof-of-Replication and Proof-of-Spacetime
  • Native Lotus API: Filecoin.* methods for tipsets, actors, miners, messages, and wallet balances
  • FEVM (EVM Compatibility): Deploy Solidity contracts on the Filecoin EVM at chain ID 314 with standard eth_* methods
  • Tipset Chain Structure: Blocks are grouped into tipsets per epoch; state is read against a tipset key
  • Content Addressing: Chain objects are identified by CIDs, integrating with IPFS content addressing
  • FIL Native Token: FIL pays for storage and gas; the base unit is attoFIL (1 FIL = 10^18 attoFIL)
  • Actor Model: Accounts, miners, and system components are actors with code and state

GetBlock's Filecoin API reference documentation is provided for informational purposes and developer experience. The canonical specifications are maintained by the Filecoin project: the Lotus JSON-RPC reference at docs.filecoin.io, and the Ethereum JSON-RPC API for the FEVM. Amounts are in attoFIL.

Network Information

PropertyValue
Network NameFilecoin Mainnet
Native CurrencyFIL (1 FIL = 10^18 attoFIL)
FEVM Chain ID314 (0x13a)
Epoch (Block Time)~30 seconds
ConsensusExpected Consensus (PoRep and PoSt)
Native APILotus JSON-RPC (Filecoin.&#x3C;Method>)
EVM LayerFEVM (EVM-compatible, eth_*)
Address FormatsFilecoin (f0/f1/f2/f3/f4) and 0x (FEVM)
Block ExplorerFilfox
TestnetCalibration (FEVM Chain ID 314159)

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

Both the native and FEVM methods are called by sending a POST request with a JSON-RPC 2.0 body to the endpoint. Replace <ACCESS-TOKEN> with the access token from the GetBlock dashboard.

Supported Networks

NetworkNative (Lotus)FEVM (eth_)WebsocketFrankfurt, Germany
Mainnet✅✅✅✅

Calibration Testnet (FEVM Chain ID 314159) is the test environment for staging before mainnet. Confirm testnet endpoint availability from the GetBlock dashboard.
<br>

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios (JavaScript / Node.js)
  • Python (Requests library)

Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).

  1. Setup project

    Create and initialize a new project:

    bashmkdir polkadot-api-quickstart
    cd polkadot-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

    javascriptimport axios from 'axios';
    
    const data = JSON.stringify({
        "jsonrpc": "2.0",
        "method": "eth_chainId",
        "params": [],
        "id": "getblock.io"
    });
    
    const config = {
        method: 'post',
        url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/',
        headers: {
            'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios(config)
        .then(response => console.log(JSON.stringify(response.data, null, 2)))
        .catch(error => console.log(error));

    Replace <ACCESS-TOKEN> with your actual GetBlock access token.

  6. Run the script

    bashnode index.js

    Expected output:

    json{
        "jsonrpc": "2.0",
        "result": "0x13a",
        "id": "getblock.io"
    }

    The result field is the Kaia Mainnet chain ID (0x2019 = 8217 in decimal). This confirms you are connected to the correct network.

  1. Setup the project directory

    bashmkdir polkadot-api-quickstart
    cd polkadot-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create script

    Create a file called main.py with the following content:

    main.py

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/ACCESS-TOKEN>/"
    
    payload = json.dumps({
        "jsonrpc": "2.0",
        "method": "eth_chainId",
        "params": [],
        "id": "getblock.io"
    })
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    response = requests.post(url, headers=headers, data=payload)
    print(response.text)

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  5. Run the script

    bashpython main.py

APIs

Support

For technical support and questions:

See Also