Implement setRecord and add test for setAutorityBond

This commit is contained in:
nabarun authored and Ashwin Phatak committed 2022-04-21 09:44:24 +05:30
1 parent 48507ca46a
commit 9de3c59c19
17 files changed
+901 -53

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
record:
type: watcher
name: ERC20 Watcher
version: 1.0.0
protocol:
/: QmdeazkS38aCrqG6qKwaio2fQnShE6RGpmNdqStLkkZcQN
+10
View File
@@ -1,4 +1,14 @@
import assert from 'assert';
import yaml from 'node-yaml';
import semver from 'semver';
export const ensureUpdatedConfig = async (path: string) => {
const conf = await yaml.read(path);
conf.record.version = semver.inc(conf.record.version, 'patch');
await yaml.write(path, conf);
return conf;
};
export const getConfig = () => {
assert(process.env.PRIVATE_KEY);