forked from cerc-io/registry-sdk
Implement setRecord and add test for setAutorityBond
This commit is contained in:
1 parent
48507ca46a
commit
9de3c59c19
17 files changed
+901
-53
No files matched your search
@@ -0,0 +1,6 @@
|
||||
record:
|
||||
type: watcher
|
||||
name: ERC20 Watcher
|
||||
version: 1.0.0
|
||||
protocol:
|
||||
/: QmdeazkS38aCrqG6qKwaio2fQnShE6RGpmNdqStLkkZcQN
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user