DEV Community

Gunner Andersen
Gunner Andersen

Posted on

Tired of Rewriting Web3 Integrations? Help us grow M3S, the New Modular Open-Source Standard

As dApps grow, the hidden cost of Web3 is API fragmentation. Our solution is a community-driven adapter framework designed to make your code provider-agnostic.


The Web3 Developer's Unspoken Pain Point

Every developer building dApps faces the same hidden cost: API fragmentation.

It goes like this: You set up your initial wallet integration (say, with MetaMask using a specific SDK). A few months later, your product team wants to support WalletConnect, Ledger, or maybe a gas-less provider like Web3Auth.

What happens? You spend days rewriting code. You change method names, update argument signatures, and migrate entire logic layers, just to perform the same action (signData, sendTransaction). This constant friction stifles innovation and slows down the multi-chain future.

M3S: The Modular Solution for Code Portability

We built M3S (Modular Multi-chain Suite), an open-source TypeScript framework, to end this cycle.

M3S works on a simple promise: Your dApp's business logic should never change when the provider does.

It uses an Adapter Pattern that abstracts away the specific implementation of any given wallet, smart contract, or cross-chain service.

The Power of Abstraction in Action

Here’s a real example from our demo showing how M3S abstracts provider selection and usage.

1. Configuration: Creating the Provider-Agnostic Wallet

Here, we decide which adapter to use (e.g., ethers or web3auth) based on a simple configuration, but the rest of the application remains unaware of the choice:

// 1. Logic to define which specific adapter (ethers, web3auth) is needed
function createWalletConfig(type: "ethers" | "web3auth", options?: any) {
  // ... returns adapter config based on 'type' ...
  // ... ensures configurations are correctly formatted for the registry ...
}

// 2. M3S dynamically loads and creates the wallet instance
const { createWallet } = await import("@m3s/wallet");
const config = createWalletConfig(type, finalOptions);

// **IEVMWallet** is the common interface the rest of the app will use.
const newWallet = await createWallet<IEVMWallet>(config);
Enter fullscreen mode Exit fullscreen mode

2. Usage: Executing a Method on the Common API

Regardless of whether we chose ethers or web3auth in the previous step, the signature of the method remains exactly the same:

// The core application logic is simple and provider-agnostic:
const network = await newWallet.getNetwork();
const accounts = await newWallet.getAccounts();

// ... logic to prepare the typedData object (EIP-712) ...

// This line is the KEY. It calls the method on the **IEVMWallet** interface.
// M3S ensures the correct provider-specific method is executed underneath.
const signature = await newWallet.signTypedData(typedData);
Enter fullscreen mode Exit fullscreen mode

The result? Your code is truly provider-agnostic and infinitely more maintainable.

The Vision: A Community-Driven Standard

M3S isn't meant to be just another SDK; it's a foundation for a community standard.

WalletConnect solved fragmentation for connection protocols. M3S aims to solve fragmentation for all Web3 operations (wallets, smart contracts, swaps, bridges).

🤝 API Consensus: We plan to evolve the common API through community consensus (leveraging NPM packages and a future DAO structure). This ensures the API isn't controlled by a single vendor, but is robustly defined by the developers who use it.

🚀 The Network Effect: Every new adapter added by a community member (for a new chain like Solana or a new provider) makes the common API stronger and more complete, benefiting every single person using M3S.

We are currently stable on EVM chains and ready for collaboration to bring in new ecosystems.

Join the Movement

We invite all developers tired of rewriting code to explore the framework. Take a look at the UniversalRegistry architecture—it's the heart of our deterministic validation system.

If you build dApps in TypeScript, we'd love for you to get involved!

GitHub (Source Code)

Simple Demo and Documentation

NPM Packages

Top comments (0)