diff --git a/demo/README.md b/demo/README.md index 8b975d2..dc85552 100644 --- a/demo/README.md +++ b/demo/README.md @@ -2,10 +2,12 @@ ## Setup +* Install laconic CLI globally as suggested in the [installation steps](../README.md#install) + * Run the laconicd chain: ```bash - # In laconcid + # In laconci2d repo make install ./scripts/init.sh clean ``` @@ -13,38 +15,38 @@ * Create and populate `config.yml` following [config.example.yml](./config.example.yml): ```bash + # In laconic-registry-cli repo root cp config.example.yml config.yml - # Change the gas value in config.yml + # Update the gas value in config.yml # gas: 500000 - # Get user key and set it to userKey in config.yml + # Get user private key laconicd keys export alice --unarmored-hex --unsafe --keyring-backend test --home ~/.laconicd + # Set the output as 'userKey' in config.yml + # userKey: + # Create a bond - laconicd tx bond create 100000000000photon --fees 100photon --from alice + laconic --config config.yml registry bond create --type photon --quantity 100000000000 - # Get the bond id and set it to bondId in config.yml - laconicd query bond list - ``` + # Get the bond id + laconic --config config.yml registry bond list | jq -r '.[].id' -* Install the CLI: - - ```bash - yarn && yarn build - yarn global add file:$PWD + # Set the output as 'bondId' in config.yml + # bondId: ``` ## Run -* Publish records from [`demo/records`](./demo/records): +* Publish records: ```bash - # Publishes records and corresponding 'deployment' records + # Publishes records and corresponding 'deployment' records from given directory - # In laconic-registry-cli + # In laconic-registry-cli repo root # Use records dir path for '--records' as required - yarn ts-node demo/scripts/publish-records.ts --config config.yml --records demo/records + yarn ts-node demo/scripts/publish-records.ts --config config.yml --records ``` ### Example diff --git a/demo/records/service/deployments/archive-lotus-deployment.json b/demo/records/service/deployments/archive-lotus-deployment.json deleted file mode 100644 index 8ff94e8..0000000 --- a/demo/records/service/deployments/archive-lotus-deployment.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "ServiceDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "lotus", - "service": "", - "url": "https://lotus-rpc-endpoint.example.com", - "needs_auth": false, - "meta": { - "machine_name": "", - "node_type": "archive", - "chain": "314", - "eth_rpc_enabled": true - } -} diff --git a/demo/records/service/deployments/gibbon-geth-deployment.json b/demo/records/service/deployments/gibbon-geth-deployment.json deleted file mode 100644 index 167578d..0000000 --- a/demo/records/service/deployments/gibbon-geth-deployment.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "ServiceDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "geth", - "service": "", - "url": "https://geth-rpc-endpoint-2.example.com", - "needs_auth": false, - "meta": { - "machine_name": "gibbon", - "chain": "1", - "sync_mode": "snap", - "gc_mode": "archive" - } -} diff --git a/demo/records/service/deployments/kindred-geth-deployment.json b/demo/records/service/deployments/kindred-geth-deployment.json deleted file mode 100644 index 7be6902..0000000 --- a/demo/records/service/deployments/kindred-geth-deployment.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "ServiceDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "geth", - "service": "", - "url": "https://geth-rpc-endpoint-1.example.com", - "needs_auth": false, - "meta": { - "machine_name": "kindred", - "chain": "1", - "sync_mode": "full", - "gc_mode": "archive" - } -} diff --git a/demo/records/service/deployments/sandman-lotus-deployment.json b/demo/records/service/deployments/sandman-lotus-deployment.json deleted file mode 100644 index 977fb33..0000000 --- a/demo/records/service/deployments/sandman-lotus-deployment.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type": "ServiceDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "lotus", - "service": "", - "url": "https://lotus-rpc-endpoint.example.com", - "needs_auth": false, - "meta": { - "machine_name": "sandman", - "node_type": "full", - "chain": "314", - "eth_rpc_enabled": true - } -} diff --git a/demo/records/service/geth.json b/demo/records/service/geth.json deleted file mode 100644 index 8d7ff5e..0000000 --- a/demo/records/service/geth.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "ServiceRecord", - "version": "0.1.0", - "schema": "", - "name": "geth", - "repository": "https://git.vdb.to/cerc-io/plugeth", - "repository_ref": "c50b6cc026207b195ad7f9afdbe919a1fe676e67", - "repository_tag": "v1.13.14-cerc-0" -} diff --git a/demo/records/service/lotus.json b/demo/records/service/lotus.json deleted file mode 100644 index 393915e..0000000 --- a/demo/records/service/lotus.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "ServiceRecord", - "version": "0.1.0", - "schema": "", - "name": "lotus", - "repository": "https://git.vdb.to/cerc-io/lotus", - "repository_ref": "9dc9a5cf45acc7ee86371af2092dd7c04db26930", - "repository_tag": "v1.26.1" -} diff --git a/demo/records/subgraph/deployments/sushiswap-blocks-subgraph-deployment.json b/demo/records/subgraph/deployments/sushiswap-blocks-subgraph-deployment.json deleted file mode 100644 index ad78a6b..0000000 --- a/demo/records/subgraph/deployments/sushiswap-blocks-subgraph-deployment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "SubgraphDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-blocks-subgraph", - "subgraph_name": "sushiswap/blocks", - "subgraph": "", - "subgraph_id": "QmfBt5NbZdNhBoZS6MFj891YpNWQs8ysWkwVeEHF6rvscg", - "network": "filecoin", - "chain": "314", - "url": "https://sushiswap-blocks-subgraph-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/subgraph/deployments/sushiswap-route-processor-subgraph-deployment.json b/demo/records/subgraph/deployments/sushiswap-route-processor-subgraph-deployment.json deleted file mode 100644 index d35d16a..0000000 --- a/demo/records/subgraph/deployments/sushiswap-route-processor-subgraph-deployment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "SubgraphDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-route-processor-subgraph", - "subgraph_name": "sushiswap/rp4-filecoin", - "subgraph": "", - "subgraph_id": "QmcHTxwH74YgaMJFXKrNqpVVdQQWAyhbxMh9xUtYjKa3fw", - "network": "filecoin", - "chain": "314", - "url": "https://sushiswap-route-processor-subgraph-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/subgraph/deployments/sushiswap-subgraph-deployment.json b/demo/records/subgraph/deployments/sushiswap-subgraph-deployment.json deleted file mode 100644 index cd83669..0000000 --- a/demo/records/subgraph/deployments/sushiswap-subgraph-deployment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "SubgraphDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-subgraph", - "subgraph_name": "sushiswap/sushiswap-filecoin", - "subgraph": "", - "subgraph_id": "QmbZdkSH5NoS1aycafeqQZ7QJycokDVBXG2526g5KmuR1F", - "network": "filecoin", - "chain": "314", - "url": "https://sushiswap-subgraph-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/subgraph/deployments/sushiswap-v2-subgraph-deployment.json b/demo/records/subgraph/deployments/sushiswap-v2-subgraph-deployment.json deleted file mode 100644 index ab71419..0000000 --- a/demo/records/subgraph/deployments/sushiswap-v2-subgraph-deployment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "SubgraphDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-v2-subgraph", - "subgraph_name": "sushiswap/v2-filecoin", - "subgraph": "", - "subgraph_id": "QmejnkeYZxJKxz6kV62V6mSmAKVDuyoiDsempRC6NMunYo", - "network": "filecoin", - "chain": "314", - "url": "https://sushiswap-v2-subgraph-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/subgraph/deployments/sushiswap-v3-subgraph-deployment.json b/demo/records/subgraph/deployments/sushiswap-v3-subgraph-deployment.json deleted file mode 100644 index dec8b61..0000000 --- a/demo/records/subgraph/deployments/sushiswap-v3-subgraph-deployment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": "SubgraphDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-v3-subgraph", - "subgraph_name": "sushiswap/v3-filecoin", - "subgraph": "", - "subgraph_id": "QmRPQM4ZtRJYr8WiNdg6oqKRNQHHXv5rZrD4gzqQrJpPhz", - "network": "filecoin", - "chain": "314", - "url": "https://sushiswap-v3-subgraph-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/subgraph/sushiswap-blocks-subgraph.json b/demo/records/subgraph/sushiswap-blocks-subgraph.json deleted file mode 100644 index 2c7f942..0000000 --- a/demo/records/subgraph/sushiswap-blocks-subgraph.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "SubgraphRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-blocks-subgraph", - "repository": "https://github.com/sushiswap/subgraphs", - "repository_ref": "533749731563023903410a58013167bc10d06a88", - "repository_tag": "", - "subgraph_dir": "subgraphs/blocks" -} diff --git a/demo/records/subgraph/sushiswap-route-processor-subgraph.json b/demo/records/subgraph/sushiswap-route-processor-subgraph.json deleted file mode 100644 index a826587..0000000 --- a/demo/records/subgraph/sushiswap-route-processor-subgraph.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "SubgraphRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-route-processor-subgraph", - "repository": "https://github.com/sushiswap/subgraphs", - "repository_ref": "382f888489ffc27d394775f9c1719dba7bacef63", - "repository_tag": "", - "subgraph_dir": "subgraphs/route-processor" -} diff --git a/demo/records/subgraph/sushiswap-subgraph.json b/demo/records/subgraph/sushiswap-subgraph.json deleted file mode 100644 index ca7b666..0000000 --- a/demo/records/subgraph/sushiswap-subgraph.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "SubgraphRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-subgraph", - "repository": "https://github.com/sushiswap/subgraphs", - "repository_ref": "533749731563023903410a58013167bc10d06a88", - "repository_tag": "", - "subgraph_dir": "subgraphs/sushiswap" -} diff --git a/demo/records/subgraph/sushiswap-v2-subgraph.json b/demo/records/subgraph/sushiswap-v2-subgraph.json deleted file mode 100644 index d68fcfb..0000000 --- a/demo/records/subgraph/sushiswap-v2-subgraph.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "SubgraphRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-v2-subgraph", - "repository": "https://github.com/sushiswap/subgraphs", - "repository_ref": "d491b69adb9ff3666162ac284ab77a146f231794", - "repository_tag": "", - "subgraph_dir": "subgraphs/v2" -} diff --git a/demo/records/subgraph/sushiswap-v3-subgraph.json b/demo/records/subgraph/sushiswap-v3-subgraph.json deleted file mode 100644 index 09fc58f..0000000 --- a/demo/records/subgraph/sushiswap-v3-subgraph.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "SubgraphRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-v3-subgraph", - "repository": "https://github.com/sushiswap/subgraphs", - "repository_ref": "d491b69adb9ff3666162ac284ab77a146f231794", - "repository_tag": "", - "subgraph_dir": "subgraphs/v3" -} diff --git a/demo/records/watcher/ajna-watcher.json b/demo/records/watcher/ajna-watcher.json deleted file mode 100644 index 2433ebb..0000000 --- a/demo/records/watcher/ajna-watcher.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "WatcherRecord", - "version": "0.1.0", - "schema": "", - "name": "ajna-watcher", - "repository": "https://git.vdb.to/cerc-io/ajna-watcher-ts", - "repository_ref": "66b8d96308eacab1ef6a4f3cb74a0f28fb18dc67", - "repository_tag": "v0.1.3", - "is_subgraph_watcher": true -} diff --git a/demo/records/watcher/azimuth-watcher.json b/demo/records/watcher/azimuth-watcher.json deleted file mode 100644 index c3075a2..0000000 --- a/demo/records/watcher/azimuth-watcher.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "WatcherRecord", - "version": "0.1.0", - "schema": "", - "name": "azimuth-watcher", - "repository": "https://github.com/cerc-io/azimuth-watcher-ts", - "repository_ref": "ffd8baa4bcdd0b0fff701d942de572b7ddf33191", - "repository_tag": "v0.1.3", - "is_subgraph_watcher": false -} diff --git a/demo/records/watcher/deployments/ajna-watcher-deployment.json b/demo/records/watcher/deployments/ajna-watcher-deployment.json deleted file mode 100644 index 352f6d1..0000000 --- a/demo/records/watcher/deployments/ajna-watcher-deployment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "WatcherDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "ajna-watcher", - "watcher": "", - "kind": "active", - "chain": "314", - "url": "https://ajna-watcher-endpoint.example.com", - "needs_auth": true -} diff --git a/demo/records/watcher/deployments/azimuth-watcher-deployment.json b/demo/records/watcher/deployments/azimuth-watcher-deployment.json deleted file mode 100644 index 68a4e53..0000000 --- a/demo/records/watcher/deployments/azimuth-watcher-deployment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "WatcherDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "azimuth-watcher", - "watcher": "", - "kind": "active", - "chain": "1", - "url": "https://azimuth-watcher-endpoint.example.com", - "needs_auth": false -} diff --git a/demo/records/watcher/deployments/sushiswap-watcher-deployment.json b/demo/records/watcher/deployments/sushiswap-watcher-deployment.json deleted file mode 100644 index aedbc0f..0000000 --- a/demo/records/watcher/deployments/sushiswap-watcher-deployment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "WatcherDeploymentRecord", - "version": "0.1.0", - "schema": "", - "request": "", - "name": "sushiswap-v3-watcher", - "watcher": "", - "kind": "active", - "chain": "314", - "url": "https://sushiswap-v3-watcher-endpoint.example.com", - "needs_auth": true -} diff --git a/demo/records/watcher/sushiswap-watcher.json b/demo/records/watcher/sushiswap-watcher.json deleted file mode 100644 index b036f73..0000000 --- a/demo/records/watcher/sushiswap-watcher.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "WatcherRecord", - "version": "0.1.0", - "schema": "", - "name": "sushiswap-v3-watcher", - "repository": "https://github.com/cerc-io/sushiswap-v3-watcher-ts", - "repository_ref": "2f9f4d1ca191805922a51d1e3b471c06314fbc64", - "repository_tag": "v0.1.9", - "is_subgraph_watcher": true -} diff --git a/demo/types/common/main.d.ts b/demo/types/common/main.d.ts deleted file mode 100644 index da0661c..0000000 --- a/demo/types/common/main.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// -// Copyright 2022 Vulcanize, Inc. -// - -declare module 'lodash-clean'; diff --git a/src/types/common/main.d.ts b/src/types/common/main.d.ts new file mode 100644 index 0000000..c9cad7c --- /dev/null +++ b/src/types/common/main.d.ts @@ -0,0 +1 @@ +declare module 'lodash-clean'; diff --git a/demo/types/common/package.json b/src/types/common/package.json similarity index 100% rename from demo/types/common/package.json rename to src/types/common/package.json diff --git a/tsconfig.json b/tsconfig.json index 1f4d39c..aad8af0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,7 @@ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ "typeRoots": [ - "./demo/types" + "src/types" ], // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ @@ -100,6 +100,6 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "include": ["src", "demo"], + "include": ["src"], "exclude": ["test"] }