| .. | ||
| records | ||
| scripts | ||
| types/common | ||
| README.md | ||
Registry Demo
Setup
-
Run the laconicd chain:
# In laconcid make install ./scripts/init.sh clean -
Create and populate
config.ymlfollowing config.example.yml:cp config.example.yml config.yml # Change the gas value in config.yml # gas: 500000 # Get user key and set it to userKey in config.yml laconicd keys export alice --unarmored-hex --unsafe --keyring-backend test --home ~/.laconicd # Create a bond laconicd tx bond create 100000000000photon --fees 100photon --from alice # Get the bond id and set it to bondId in config.yml laconicd query bond list -
Install the CLI:
yarn && yarn build yarn global add file:$PWD
Run
-
Publish records from
demo/records:# Publishes records and corresponding 'deployment' records # In laconic-registry-cli # Use records dir path for '--records' as required yarn ts-node demo/scripts/publish-records.ts --config config.yml --records demo/records
Example
-
Query for
ajna-watcherdeployment(s):-
Find the
WatcherRecordforajna-watcher:WATCHER_RECORD_ID=$(laconic registry record list --all --type WatcherRecord --name ajna-watcher | jq -r '.[].id') -
Find corresponding deployment(s):
laconic registry record list --all --type WatcherDeploymentRecord watcher $WATCHER_RECORD_ID # Get the deployment URL(s) laconic registry record list --all --type WatcherDeploymentRecord watcher $WATCHER_RECORD_ID | jq -r '.[].attributes.url' # Expected output: https://ajna-watcher-endpoint.example.com
-
-
Query for
sushiswap-v3-subgraphdeployment(s):-
Find the
SubgraphRecordforsushiswap-v3-subgraph:SUBGRAPH_RECORD_ID=$(laconic registry record list --all --type SubgraphRecord --name sushiswap-v3-subgraph | jq -r '.[].id') -
Find corresponding deployment(s):
laconic registry record list --all --type SubgraphDeploymentRecord subgraph $SUBGRAPH_RECORD_ID # Get the deployment URL(s) laconic registry record list --all --type SubgraphDeploymentRecord subgraph $SUBGRAPH_RECORD_ID | jq -r '.[].attributes.url' # Expected output: # https://sushiswap-v3-subgraph-endpoint.example.com
-
-
Query for
gethservice deployment(s):-
Find the
ServiceRecordforgeth:SERVICE_RECORD_ID=$(laconic registry record list --all --type ServiceRecord --name geth | jq -r '.[].id') -
Find corresponding deployment(s):
laconic registry record list --all --type ServiceDeploymentRecord service $SERVICE_RECORD_ID # Get the deployment URL(s) laconic registry record list --all --type ServiceDeploymentRecord service $SERVICE_RECORD_ID | jq -r '.[].attributes.url' # Expected output: # https://geth-rpc-endpoint-1.example.com # https://geth-rpc-endpoint-2.example.com
-