Quickstart guide
0 to 1 as fast as possible
Last updated
0 to 1 as fast as possible
Last updated
The recommended path to developing an application with MEM is:
in JavaScript, leaning on examples and the syntax spec for guidance
or locally
to the
with your UI using API calls
Get your function whitelisted for mainnet
The fastest and best-documented way to write MEM functions is in JavaScript. The and has plenty you can test and fork for common backend patterns.
Here's the function.js for a counter:
Use the +
button for a new blank slate or to choose one of the examples.
By default, functions in MEM are fully public and anonymous.
Install the CLI:
Deploy a function:
Copy the function ID from the CLI once deployed.
Here's its respective state.json, which holds global variables and the :
Counter ( | )
Guestbook ( | )
Name service ()
The is a web playground for you to write and test functions without needing to deploy them live.
Each function consists of a function.js
and a state.json
-- the state holds global variables and the function , which populates the interaction panel below the function code editor.
The is powered by the package, which you can also run locally.
Developers can add web3 via in-function calls to authentication . These molecules accept a wallet address and a signature and return true/false based on whether the signature can be verifiably attributed to the caller.
.
When you're happy with how the function runs in the IDE, you can use the to deploy it to the .
Mainnet functions must be whitelisted before they will accept interactions. This is a temporary safeguard while MEM is in beta. Use to submit a whitelist request. We recommend developers use the MEM Carbon Testnet by passing the --testnet
flag to the CLI.
MEM functions can be and from a front end using the .
Reach out to us on and , or to discuss.