Full Linea RPC APIs Support in Web3j 2025 Update: Off to a Fast Start! Read on → Search Join About About Explore membership Members Technical Advisory Council Governing Board Speakers Bureau Staff FAQ Store Contact us Technologies Ledger technologies Interoperability Integration & implementation Decentralized identity Cryptographic tools & protocols Project matrix Labs All projects Deploy Certified service providers Vendor directory Training partners Participate Why get involved? How to contribute Contribute to code Host your project with us Regional chapters Special interest groups Job board Resources Linux Foundation ID Logos & guidelines Trademarks & guidelines Charter Code of conduct Github repos Discord Wiki Mailing lists Report a security bug Learn Case studies Training & certifications Use case tracker Member webinars Insights News Blog Announcements Newsletters Events Events Meetups Meeting calendar Join Follow Us Web3j Full Linea RPC APIs Support in Web3j Nischal Sharma, Webj3 maintainer and Blockchain Developer at Web3 Labs | Mar 3, 2025 Web3j, an LF Decentralized Trust project, is a lightweight, highly modular Java library for integrating Ethereum-based applications. It allows developers to interact with Ethereum smart contracts, transactions, and accounts seamlessly. With growing adoption of Layer 2 solutions, Web3j has expanded its support for Layer 2 EVM-compatible chains like Linea, enabling developers to leverage cost-efficient and scalable blockchain interactions. Introduction to Linea Linea is a Layer 2 solution built on Ethereum that leverages zero-knowledge rollups (ZK-rollups) to provide fast, cost-efficient transactions. As part of its infrastructure, Linea offers a set of RPC APIs that developers can use to interact with the network, retrieve blockchain data, estimate transaction fees, and verify proofs. With the latest updates in Web3j, we now support full integration of Linea RPC APIs, enabling developers to seamlessly interact with the Linea network using Java and Kotlin. Linea RPC APIs in Web3j Web3j now supports the following Linea-specific RPC methods: 1. linea_estimateGas This API estimates the gas required for a transaction to be successfully executed on the Linea network. Returns the recommended gas limit, base fee per gas, and priority fee per gas. Uses the same inputs as `eth_estimateGas`, but provides more accurate results tailored for Linea. Sample Code for `linea_estimateGas` in Hyperledger Web3j 2. linea_getProof This API retrieves the account and storage values, including Merkle proof verification, for a given account at a specific block. Provides Merkle proof of an account’s existence or non-existence. Includes account balance, nonce, code hash, and storage proof. The block parameter must reference an L2 block that has been finalized on L1. Sample Code for `linea_getProof` in Web3j 3. linea_getTransactionExclusionStatusV1 This API checks whether a transaction was rejected by the Linea sequencer or RPC nodes. Can only query transactions attempted within the past 7 days. If rejected, it returns the reason for rejection. If the transaction was not rejected, the response is null. Sample Code for `linea_getTransactionExclusionStatusV1` in Web3j Testing and Feedback Developers can now test these APIs using Web3j by connecting to a Linea RPC endpoint. We encourage users to test and provide feedback on this integration to improve usability and reliability. The PR - https://github.com/hyperledger-web3j/web3j/pull/2150 - has been merged into the main branch and will be available in Web3j v4.13.0, the next major release. Conclusion With full support for Linea’s RPC APIs, Web3j provides developers with a seamless experience for interacting with the Linea network. By leveraging these features, developers can efficiently estimate gas costs, verify transaction proofs, and handle transaction exclusion scenarios. We look forward to your feedback on this integration and any suggestions for additional features! If you are interested in contributing to Web3j’s ongoing development, feel free to check out our GitHub repository and join the discussions! You can also find us here on the LF Decentralized Trust Discord.   View previous blog post Back to all blog posts View next blog post The latest community news in your inbox Select the checkboxes below for the monthly decentralized digest and dev/weekly newsletters About LF Decentralized Trust The Linux Foundation's flagship organization for the development and deployment of decentralized systems and technologies. About Members TAC Governing board Speakers bureau Staff FAQ Contact us Technologies Ledger technologies Interoperability Integration & implementation Decentralized identity Cryptographic tools & protocols Project matrix Labs Participate Why get involved? How to contribute Contribute to code Host your project with us Regional chapters Special interest groups Job board Deploy Certified service providers Vendor directory Training partners Resources Linux Foundation ID Logos & guidelines Trademarks & guidelines Charter Code of conduct Github repos Discord Wiki Mailing lists Report a security bug Learn Case studies Training & certifications Use case tracker Member webinars Insights Events Events Meetups Meeting calendar News Blog Announcements Newsletters Meeting Calendar Copyright © 2025 The Linux Foundation®. All rights reserved. LF Decentralized Trust is a trademark of The Linux Foundation. For a list of LF Decentralized Trust's trademarks, please see our Trademark Usage page. Linux is a registered trademark of Linus Torvalds. Privacy Policy and Terms of Use.