Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/decentldotland/mem-cli

CLI for interacting with the MEM protocol
https://github.com/decentldotland/mem-cli

Last synced: 3 days ago
JSON representation

CLI for interacting with the MEM protocol

Awesome Lists containing this project

README

        





@decentdotland/mem-cli


a CLI to interact with the MEM protocol

## Build & Run Server

```bash
git pull https://github.com/decentldotland/mem-cli.git

npm install && npm run server
```

## Install the CLI

```bash
npm i -g mem-cli-js
```

## CLI Commands

### Deploy a MEM serverless function:

```bash
mem deploy --src [path-to-source-code] --init-state [stringified-initial-state || ./path-to-state.json] --testnet [optional to deploy on MEM Carbon testnet]
```

#### Example

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

### Write to a MEM serverless function:

```bash
mem write --functionId [MEM function ID] --inputs [the contract interaction stringified inputs object] --testnet [optional to write to a MEM Carbon function]
```

#### Example

```bash
mem write --function-id e695edc7-4919-0a1d-3d99-b725661904ad --inputs '{"function":"increment"}'
```

## License
This project is licensed under the [MIT License](./LICENSE)