MEM
WebsiteLabsGuides
  • โš—๏ธMolecular Execution Machine
  • ๐Ÿ‘‹Introduction
    • What is MEM?
    • MEM features
    • MEM vs alternatives
    • Technical architecture
    • Use-case examples
  • โšกQuickstart
    • Quickstart guide
  • ๐Ÿ“–MEM Specifications
    • Function syntax
    • Function specs
    • Transaction specs
    • Supported languages
    • About MIPs
  • โš›๏ธMolecules
    • Overview
    • Multichain authentication
    • Using APIs
    • API reference
  • ๐ŸงชMEM IDE
    • Overview
    • Function ABI
  • โš’๏ธMEM Carbon Testnet
    • Overview
    • Deploy to testnet
    • Interact with testnet functions
  • โš™๏ธMEM SDK
    • SDK Usage
  • ๐Ÿ–ฅ๏ธMEM CLI
    • Function deployment
    • Function interaction
  • ๐Ÿ—๏ธMEM API
    • Overview
    • Write operations
    • Read operations
  • โš›๏ธ3EM-MEM
    • Overview
    • EXM API
    • Key-Value Storage (KVS)
  • ๐ŸงฉExamples
    • Pastebin clone
    • Query onchain data
Powered by GitBook

mem.tech ยฉ 2023

On this page
  • Prerequisites
  • Deploying a function to the MEM Carbon Testnet
  • Deploying a function to mainnet
  1. MEM CLI

Function deployment

Deploy MEM functions using the CLI

PreviousSDK UsageNextFunction interaction

Last updated 1 year ago

Only whitelisted functions can be interacted with on mainnet while MEM is in beta.

Use the to simulate a production environment. When you're ready to deploy to mainnet:

  1. Use the CLI to deploy as described below

  2. Submit the function ID to the whitelist using

Prerequisites

Installing MEM CLI on your machine

npm i -g mem-cli-js

Deploying a function to the MEM Carbon Testnet

mem deploy --testnet --src [path-to-source-code] --init-state [stringified-initial-state]

Example

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

Deploying a function to mainnet

mem deploy --src [path-to-source-code] --init-state [stringified-initial-state]

Example

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

To check the CLI source code:

๐Ÿ–ฅ๏ธ
MEM Carbon Testnet
this form.
https://github.com/decentldotland/mem-cli