Function deployment

Deploy MEM functions using the CLI

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

Use the MEM Carbon Testnet 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 this form.

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: https://github.com/decentldotland/mem-cli

Last updated

mem.tech ยฉ 2023