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.


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]


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]


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

To check the CLI source code:

Last updated ยฉ 2023