Cointime

Download App
iOS & Android

Open sourcing op-viem and op-wagmi

TLDR: Today, we’re open sourcing op-viem and op-wagmi, extensions to the popular developer tools viem and wagmi. We’ve developed these libraries, in collaboration with the community, to empower developers to build faster and easier on OP Stack chains.

Building for OP chains with op-viem and op-wagmi

Base aims to bring the next million builders and billion users onchain, giving builders an easy-to-use, fast, and cheap development platform.

While L2s like Base offer developers cost and speed advantages, they can have their own development challenges. As we started to build on the OP Stack ourselves, we found gaps in tooling that weren't addressed by existing Ethereum development frameworks. That’s why we decided to extend popular Ethereum libraries for developers building on the OP Stack, and are open sourcing them so that anyone can review the codebase and contribute.

Why?

Today, developers building on Ethereum can use a number of libraries to simplify development, including the popular tools viem and wagmi. Viem is a low-level library compatible with any JavaScript code, abstracting the complexity of sending transactions on Ethereum. Wagmi, built on Viem, lets developers build an application’s frontend using modern React idioms.

Although viem and wagmi work out-of-the-box on the OP Stack, they don’t easily support features specific to L2s, such as bridging and cross-layer messaging. Developers looking to build these features into their applications still need to write custom code, making the process more complex and error-prone. For example, if a developer called the bridge contract code incorrectly, user assets could be lost.

With op-viem and op-wagmi, developers can add OP Stack bridging functionality into any application with dramatically less code and time spent. For example, creating a withdrawal proof can now be done via the code below, which replaces a 100+ line implementation of a React hook that would be needed without these libraries.

The full-featured React hooks in op-wagmi streamline adding cross-chain functionality to React-based dapps. For JavaScript developers using frontend frameworks other than React, op-viem provides all the building blocks needed to adopt the same functionality to their framework of choice.

Growing the onchain ecosystem, one bridge at a time

L2s enable users to use apps quickly and cheaply. But when users start onchain, they often don't have assets on an L2 right away.

As more and more users get onchain and transact on L2s, developers will need to offer their users a secure and intuitive way to bridge as a critical first step.

With op-viem and op-wagmi, you can build bridging functionality inside your apps with minimal custom code. Op-viem also provides lower-level utilities that can help with things like getting L2 hashes for deposit transactionsgetting outputs on L1 for L2 blocks, and more.

Public goods

Base is committed to building in the open, and in the spirit of empowering the entire ecosystem, we built op-viem and op-wagmi as open-source libraries. Our goal is to not only benefit builders on Base, but everyone who is building on the OP Stack and contributing towards the Superchain vision.

You can check out the code for op-viem and op-wagmi, and contribute any feedback that you might have. We're excited to hear from you and to see what you build!

Spotted a cool project built on Base? Don’t forget to nominate them for a Base Grant!

Comments

All Comments

Recommended for you

  • Zhipu Launches and Open Sources GLM-5.3-Flash

    On August 26, Zhipu launched and open-sourced GLM-5.3-Flash (320B-A18B), the first native multimodal model in the GLM-5 series. It features a total of 320 billion parameters and surpasses GLM-5.2, achieving a score of 57 on the globally recognized Artificial Analysis Intelligence Index (AA Comprehensive Intelligence Index), placing it among the leading models worldwide, on par with Anthropic's popular model Claude Opus 4.8. In the self-developed Z.ai Code Bench evaluation, its programming performance is comparable to that of Claude Opus 4.8. Additionally, GLM-5.3-Flash is priced at 1/10 of GLM-5.3, and during a limited-time discount, it is priced at 1/20 of GLM-5.3, which is 1/40 of Opus 4.8. The same intelligence at 1/40 the price, cutting-edge capabilities without the need to hold back.

  • Zhipu Launches and Open Sources GLM-5.3-Flash

    On August 26, Zhipu launched and open-sourced GLM-5.3-Flash (320B-A18B), the first native multimodal model in the GLM-5 series. It has a total of 320 billion parameters and surpasses GLM-5.2, achieving a score of 57 in the globally recognized Artificial Analysis Intelligence Index (AA Comprehensive Intelligence Index), placing it among the leading models worldwide, on par with Anthropic's popular model Claude Opus 4.8. In the self-developed Z.ai Code Bench evaluation, its programming performance is comparable to that of Claude Opus 4.8. Meanwhile, GLM-5.3-Flash is priced at 1/10 of GLM-5.3, and during a limited-time discount, it is available for 1/20 of GLM-5.3's price, which is 1/40 of Opus 4.8's price. The same intelligence, at 1/40 the cost, provides cutting-edge capabilities without the need to hold back.

  • Ethereum Developers Propose Restructuring Validator Staking Contract to Prepare for Quantum Attacks

    On August 26, Ethereum researchers proposed a draft to rebuild the validator deposit contract in preparation for the future introduction of quantum-resistant signature mechanisms, allowing for a gradual phase-out of the existing BLS signature format. This proposal enables the deposit contract to support keys of different sizes and public key types, assigning labels for each cryptographic scheme, with the current BLS signature labeled as 0 and potential future quantum-resistant schemes receiving new labels. Currently, approximately 42.4 million ETH, worth around $10.4 billion, are staked in Ethereum, all relying on BLS validator keys. This draft is still in its early stages and must be implemented alongside subsequent consensus layer upgrades, with the Ethereum Foundation's overall quantum resistance roadmap targeting around 2029.

  • Ethereum Developers Propose Restructuring Validator Staking Contract to Prepare for Quantum Attacks

    On August 26, Ethereum researchers proposed a draft to rebuild the validator deposit contract in preparation for the future introduction of quantum-resistant signature mechanisms, allowing for a gradual phase-out of the existing BLS signature format. This proposal enables the deposit contract to support keys of different sizes and public key types, assigning labels for each cryptographic scheme, with the current BLS signature labeled as 0, and future quantum-resistant schemes to be assigned additional labels. Currently, approximately 42.4 million ETH, valued at around $10.4 billion, are staked in Ethereum, all relying on BLS validator keys. The draft remains in its early stages and must be implemented alongside subsequent consensus layer upgrades, with the Ethereum Foundation's overall quantum resistance roadmap targeting around 2029.

  • Spot Gold Falls Below $4600/Ounce

    On August 26, spot gold fell below $4600 per ounce, declining by 1.30% during the day.

  • Spot Gold Falls Below $4600/Ounce

    On August 26, spot gold fell below $4600 per ounce, declining by 1.30% during the day.

  • SEC Submits New Crypto Custody Regulations Proposal to White House

    On August 26, Bloomberg reported that the U.S. Securities and Exchange Commission (SEC) has submitted a proposal to the Office of Management and Budget (OMB) regarding new regulations for investment advisors holding client digital assets. The rule aims to 'clarify the framework for investment advisors and investment companies to custody crypto assets,' addressing inquiries from institutions on how to comply with the custody of digital assets. It plans to eliminate certain existing custody requirements that are considered 'outdated' due to market evolution and current trading and custody practices. This proposal is seen as a step by financial regulators to advance the current administration's crypto agenda while relevant legislation remains stalled in the Senate. It will take effect after review by the OMB, a vote by SEC commissioners, and a public comment period.

  • BTC Falls Below $78,000

    Market data shows that BTC has fallen below $78,000, currently priced at $77,983.75, with a 24-hour decline of 1.03%. The market is experiencing significant volatility, so please ensure proper risk management.

  • BTC Falls Below $78,000

    Market data shows that BTC has fallen below $78,000, currently priced at $77,983.75, with a 24-hour decline of 1.03%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Alibaba Qwen Releases Qwen 3.8-Flash Model

    On August 26, Alibaba Qwen launched the Qwen 3.8-Flash model, which is a multimodal MoE model and an early preview of the Qwen 4 architecture. The production version of Qwen 3.8-Flash will soon be available through the Qwen Cloud API, priced at just $0.16 per million input tokens and $0.47 per million output tokens. The model features 125 billion parameters plus 51 billion N-gram embedding parameters, but activates only 6 billion parameters per token, achieving high cost-effectiveness.