@decentldotland/mem-examples

MEM examples

Molecular Execution Machine is a web3-ready serverless functions platform. Build and deploy trustless dApps in record time ⚡️

MEM features

  • Near-instant finality
  • Multichain auth - EVM, Solana, Arweave, TON, ICP, and more
  • Multilingual - JS/TS, Rust, C/++, Python, WASM-compiled languages
  • Trustless and verifiable
  • REST-like: interact with MEM like an API
  • Web2 UX with walletless function interactions
  • Call and compute with any data source, on of off-chain

Examples list

  1. Guestbook
  2. Counter
  3. Ethereum authentication
  4. Haiku generator
  5. CRUD

Run the examples

MEM IDE (recommended)

While MEM is in beta, we recommend using the online MEM IDE to test and expand upon these examples -- no need to deploy! Copy the function and state into a new project and use the interaction objects in each example's README to test.

Local testnet

The mem-testnet repo provides instructions on how to simulate MEM functions locally. Paste function code and state into the script and write your test cases.

Mainnet (permissioned in beta)

For mainnet, MEM functions are deployed via the MEM CLI.

For example:

mem deploy --src ./function.js --init-state '{ "logs": [] }'

To interact with MEM mainnet functions while MEM is in beta, you must first get the function whitelisted via this form.