Skip to content

Commit 508750f

Browse files
committed
fix md formatting
1 parent d56ba76 commit 508750f

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Ergomatic
22

3-
[![ci](https://github.com/nautls/ergomatic/actions/workflows/ci.yaml/badge.svg)](https://github.com/nautls/ergomatic/actions/workflows/ci.yaml)[![Discord badge][]][Discord link]
3+
[![ci](https://github.com/nautls/ergomatic/actions/workflows/ci.yaml/badge.svg)](https://github.com/nautls/ergomatic/actions/workflows/ci.yaml)
4+
[![Discord badge][]][Discord link]
45

5-
`ergomatic` is a generic off-chain execution framework for bots. Bot functionality is provided via plugins which are audited by the nautilus team.
6+
`ergomatic` is a generic off-chain execution framework for bots. Bot
7+
functionality is provided via plugins which are audited by the nautilus team.
68

79
## Install
810

@@ -20,13 +22,16 @@ irm https://raw.githubusercontent.com/nautls/ergomatic/main/scripts/install/inst
2022

2123
### Running
2224

23-
Ergomatic can be ran using the `run` CLI command. The `-c` flag can optionally be passed to specify the config file path, if not provided it will default to `$CWD/ergomatic.yaml`.
25+
Ergomatic can be ran using the `run` CLI command. The `-c` flag can optionally
26+
be passed to specify the config file path, if not provided it will default to
27+
`$CWD/ergomatic.yaml`.
2428

2529
```sh
2630
ergomatic run
2731
```
2832

29-
Logs can be viewed in your terminal and are also persisted to disk depending on OS:
33+
Logs can be viewed in your terminal and are also persisted to disk depending on
34+
OS:
3035

3136
- Linux: `$XDG_DATA_HOME/ergomatic`
3237
- macOS: `$HOME/Library/Application Support/ergomatic`

docs/plugins.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22

33
## Creating a Plugin
44

5-
For this exercise lets assume I am creating a plugin for my dapp that requires off-chain bot functionality, my dapp is called "Degenz".
5+
For this exercise lets assume I am creating a plugin for my dapp that requires
6+
off-chain bot functionality, my dapp is called "Degenz".
67

7-
Firstly decide on a `id` for your plugin, this should be in `snake_case` format, in my case I will use `degenz`.
8+
Firstly decide on a `id` for your plugin, this should be in `snake_case` format,
9+
in my case I will use `degenz`.
810

911
The easiest way to get started is to use the provided plugin template:
1012

1113
```
1214
cp -r plugins/_template plugins/degenz
1315
```
1416

15-
Next update the naming of various variables and classes to match your dapp, for example:
17+
Next update the naming of various variables and classes to match your dapp, for
18+
example:
1619

1720
```
1821
export const _TEMPLATE_PLUGIN_ID = "_template_plugin"; -> export const DEGENZ_PLUGIN_ID = "degenz";
1922
interface _TemplatePluginConfig -> interface DegenzPluginConfig
2023
class TemplatePlugin -> class DegenzPlugin
2124
```
2225

23-
The template contains placeholder implementations for each plugin method, update these to implement your plugins logic as required.
24-
`onStart` is where you should do any initialization logic such as starting of tasks, etc.
25-
`onStop` is where any clean-up logic should be placed, destroying of tasks, persisting of any data, etc.
26+
The template contains placeholder implementations for each plugin method, update
27+
these to implement your plugins logic as required. `onStart` is where you should
28+
do any initialization logic such as starting of tasks, etc. `onStop` is where
29+
any clean-up logic should be placed, destroying of tasks, persisting of any
30+
data, etc.
2631

27-
Finally register your plugin for usage by added it to `pluginConstructorMap` in `plugins/mod.ts` like so:
32+
Finally register your plugin for usage by added it to `pluginConstructorMap` in
33+
`plugins/mod.ts` like so:
2834

2935
```ts
30-
3136
import { PluginConstructor } from "../src/plugins/plugin.ts";
3237
import { EXAMPLE_PLUGIN_ID, ExamplePlugin } from "./example_plugin/mod.ts";
3338
import { DEGENZ_PLUGIN_ID, DegenzPlugin } from "./degenz/mod.ts";
@@ -38,7 +43,8 @@ export const pluginConstructorMap: Record<string, PluginConstructor> = {
3843
};
3944
```
4045

41-
Now you should be all set to add your plugin to your `ergomatic` configuration file. For example:
46+
Now you should be all set to add your plugin to your `ergomatic` configuration
47+
file. For example:
4248

4349
```toml
4450
logLevel: INFO

0 commit comments

Comments
 (0)