Compare commits
1 Commits
master
...
dAppLibrar
Author | SHA1 | Date | |
---|---|---|---|
|
ac71919628 |
6
.github/workflows/deploy.yml
vendored
6
.github/workflows/deploy.yml
vendored
@ -12,8 +12,8 @@ jobs:
|
|||||||
name: Deploy to GitHub Pages
|
name: Deploy to GitHub Pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: yarn
|
cache: yarn
|
||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
# Popular action to deploy to GitHub Pages:
|
# Popular action to deploy to GitHub Pages:
|
||||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Build output to publish to the `gh-pages` branch:
|
# Build output to publish to the `gh-pages` branch:
|
||||||
|
45
.github/workflows/publish.yaml
vendored
45
.github/workflows/publish.yaml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: Publish ApplicationRecord to Registry
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
env:
|
|
||||||
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_LACONIC_USER_KEY }}
|
|
||||||
CERC_REGISTRY_BOND_ID: ${{ secrets.CICD_LACONIC_BOND_ID }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cns_publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Clone project repository"
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 18 # though you need version 14 with geojson
|
|
||||||
# - name: "Install exiftool"
|
|
||||||
# run: |
|
|
||||||
# apt-get update -y
|
|
||||||
# apt-get upgrade -y
|
|
||||||
# apt-get install exiftool -y
|
|
||||||
#- name: "Exiftool Version"
|
|
||||||
# run: |
|
|
||||||
# exiftool -ver
|
|
||||||
- name: "Install Yarn"
|
|
||||||
run: npm install -g yarn
|
|
||||||
- name: "Install registry CLI"
|
|
||||||
run: |
|
|
||||||
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
|
||||||
npm install --global @cerc-io/laconic-registry-cli
|
|
||||||
- name: "Install jq"
|
|
||||||
uses: dcarbone/install-jq-action@v2.1.0
|
|
||||||
- name: "Publish App Record"
|
|
||||||
run: scripts/publish-app-record.sh
|
|
||||||
#- name: "Create Metadata Record"
|
|
||||||
# run: scripts/create-metadata-record.sh
|
|
||||||
- name: "Request Deployment"
|
|
||||||
run: scripts/request-app-deployment.sh
|
|
4
.github/workflows/test-deploy.yml
vendored
4
.github/workflows/test-deploy.yml
vendored
@ -12,8 +12,8 @@ jobs:
|
|||||||
name: Test deployment
|
name: Test deployment
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: yarn
|
cache: yarn
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 2
|
|
||||||
---
|
|
||||||
|
|
||||||
# Getting Tokens
|
|
||||||
|
|
||||||
To get tokens on the Jackal Protocol test-network. Please go to the Jackal Protocol Discord server and head to `#faucet` in `DEVELOPERS`.
|
|
@ -10,4 +10,4 @@ Coming Soon
|
|||||||
|
|
||||||
## Jackal Custodial
|
## Jackal Custodial
|
||||||
|
|
||||||
Head over to [Stratus Cloud](https://stratuscloud.xyz) and create an account to get started.
|
Coming Soon
|
||||||
|
@ -6,64 +6,4 @@ sidebar_position: 5
|
|||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|
||||||
### Setting up your Wallet
|
Coming Soon
|
||||||
```go
|
|
||||||
seed := "SEED_PHRASE"
|
|
||||||
rpc := "https://jackal-testnet-rpc.polkachu.com:443" // testnet rpc for example
|
|
||||||
chainid := "lupulella-2" // testnet chain-id for example
|
|
||||||
|
|
||||||
wallet, err := wallet_handler.NewWalletHandler(
|
|
||||||
seed,
|
|
||||||
rpc,
|
|
||||||
chainid)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
```
|
|
||||||
### Setting up FileIO
|
|
||||||
```go
|
|
||||||
fileIo, err := file_io_handler.NewFileIoHandler(wallet)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
```
|
|
||||||
### Generating Root Folder
|
|
||||||
```go
|
|
||||||
operatingRoot := "ROOT_FOLDER_NAME"
|
|
||||||
|
|
||||||
_, err = fileIo.DownloadFolder(fmt.Sprintf("s/%s", operatingRoot))
|
|
||||||
if err != nil {
|
|
||||||
_, err = fileIo.GenerateInitialDirs([]string{operatingRoot})
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Uploading File
|
|
||||||
```go
|
|
||||||
bytes := []bytes{"SOME_FILE_DATA_HERE"}
|
|
||||||
fileName := "NAME_OF_SOME_FILE"
|
|
||||||
path := "PARENT_FOLDER_OF_SOME_FILE"
|
|
||||||
|
|
||||||
fileUpload, err := file_upload_handler.TrackVirtualFile(bytes, fileName, path)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
folder, err := fileIo.LoadNestedFolder(path)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, fids, _, err := fileIo.StaggeredUploadFiles([]*file_upload_handler.FileUploadHandler{fileUpload}, folder, false)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Downloading File
|
|
||||||
```go
|
|
||||||
handler, err := fileIo.DownloadFile("s/" + operatingRoot)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
fileBytes := handler.GetFile().Buffer().Bytes() // do with the filebytes as you please
|
|
||||||
```
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 4
|
sidebar_position: 0
|
||||||
---
|
---
|
||||||
|
|
||||||
# Setting Up
|
# Setting Up
|
||||||
|
@ -45,7 +45,7 @@ desktop for safe storage/backup.
|
|||||||
|
|
||||||
### Snapshot method
|
### Snapshot method
|
||||||
|
|
||||||
Get a snapshot [here](https://polkachu.com/tendermint_snapshots/jackal).
|
Get a snapshot [here](http://snapshots.autostake.net/jackal-1/).
|
||||||
|
|
||||||
For the sake of this guide, the snapshot we download is named `jackal.tar.lz4`
|
For the sake of this guide, the snapshot we download is named `jackal.tar.lz4`
|
||||||
|
|
||||||
@ -127,13 +127,13 @@ LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.heigh
|
|||||||
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 3000))
|
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 3000))
|
||||||
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
|
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)
|
||||||
|
|
||||||
sed -i.bak -e "s|^enable *=.*|enable = true|" $HOME/.canine/config/config.toml
|
sed -i.bak -e "s|^enable *=.*|enable = true|" $HOME/.teritorid/config/config.toml
|
||||||
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
|
sed -i.bak -e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
|
||||||
$HOME/.canine/config/config.toml
|
$HOME/.teritorid/config/config.toml
|
||||||
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
|
sed -i.bak -e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
|
||||||
$HOME/.canine/config/config.toml
|
$HOME/.teritorid/config/config.toml
|
||||||
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
|
sed -i.bak -e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
|
||||||
$HOME/.canine/config/config.toml
|
$HOME/.teritorid/config/config.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
When you state sync, you can start with the latest version of `canined`.
|
When you state sync, you can start with the latest version of `canined`.
|
||||||
|
8
docs/protocol/modules/dsig.md
Normal file
8
docs/protocol/modules/dsig.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 7
|
||||||
|
---
|
||||||
|
|
||||||
|
# dsig Module
|
||||||
|
|
||||||
|
## Coming Soon
|
||||||
|
|
21
docs/protocol/modules/lp.md
Normal file
21
docs/protocol/modules/lp.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# LP Module (Coming Soon)
|
||||||
|
|
||||||
|
The `lp` (Liquidity Provision) module is a vital part of the Jackal Protocol, enabling the creation and management of
|
||||||
|
liquidity pools for trading and swapping tokens. This module provides a decentralized solution for users to contribute
|
||||||
|
liquidity to the ecosystem and earn rewards in return.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The `lp` module manages the following aspects of liquidity pools:
|
||||||
|
|
||||||
|
1. **Liquidity Pool Creation**: Allows the creation of new liquidity pools for token pairs.
|
||||||
|
2. **Liquidity Provision**: Facilitates users to add or remove liquidity from existing pools.
|
||||||
|
3. **Token Swaps**: Enables decentralized trading and swapping of tokens within the liquidity pools.
|
||||||
|
4. **Rewards**: Distributes rewards to liquidity providers proportionate to their contribution.
|
||||||
|
|
||||||
|
For a more detailed guide on the 'lp' module, please refer to
|
||||||
|
the [module documentation](https://github.com/JackalLabs/canine-chain/blob/master/x/lp/README.md) on GitHub.
|
@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
# Command Lind Interface (CLI)
|
|
||||||
The CLI is a tool for both users and developers to interact with the Jackal Protocol without a traditional GUI.
|
|
||||||
|
|
||||||
## Download and Install
|
|
||||||
Head to the [Releases](https://github.com/JackalLabs/canine-chain/releases) page and download the binary for your system.
|
|
||||||
|
|
||||||
## Setting up an Account
|
|
||||||
You can create a new account like this:
|
|
||||||
```sh
|
|
||||||
canined keys add {account name}
|
|
||||||
```
|
|
||||||
Or you can recover an account with a seed phrase like this:
|
|
||||||
```sh
|
|
||||||
canined keys add {account name} --recover
|
|
||||||
```
|
|
||||||
|
|
||||||
## Buying Storage
|
|
||||||
Buying 1TB for a single month:
|
|
||||||
```sh
|
|
||||||
canined tx storage buy-storage $(canined keys show {account name} -a) 720h 1099511627776 ujkl --from {account name} --gas-prices=0.02ujkl
|
|
||||||
```
|
|
||||||
In this case, `720h` is 720 hours, or one month, you can specify the hours you wish to buy storage for here. `1099511627776` is how many bytes you wish to purchase, this value is 1TiB, you can increase this or decrease this as you please.
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"label": "CLI",
|
|
||||||
"position": 2
|
|
||||||
}
|
|
@ -2,13 +2,14 @@
|
|||||||
sidebar_position: 2
|
sidebar_position: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
# Accessing JKL Tokens on a Decentralized Exchange and Withdrawing to Jackal Protocol
|
# Accessing JKL Tokens on Osmosis and Withdrawing to Jackal Protocol
|
||||||
|
|
||||||
This guide will help you access JKL tokens on the Osmosis Decentralized Exchange (DEX) and withdraw them to the Jackal Protocol using the Inter-Blockchain Communication Protocol (IBC).
|
This guide will help you access JKL tokens on the Osmosis Decentralized Exchange (DEX) and withdraw them to the Jackal
|
||||||
|
Protocol using Inter-Blockchain Communication (IBC).
|
||||||
|
|
||||||
## Step 1: Set up a Keplr Wallet
|
## Step 1: Set up a Keplr Wallet
|
||||||
|
|
||||||
1. Install the [Keplr Wallet](https://wallet.keplr.app/) or [Leap Wallet](https://www.leapwallet.io/)browser extension.
|
1. Install the [Keplr Wallet](https://wallet.keplr.app/) browser extension.
|
||||||
2. Create a new wallet or import an existing one.
|
2. Create a new wallet or import an existing one.
|
||||||
3. Make sure you have some OSMO tokens in your wallet for transaction fees.
|
3. Make sure you have some OSMO tokens in your wallet for transaction fees.
|
||||||
|
|
||||||
|
6443
package-lock.json
generated
6443
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@mito/canine-docs",
|
"name": "canine-docs",
|
||||||
"repository": "https://git.vdb.to/LaconicNetwork/canine-docs",
|
"version": "0.0.0",
|
||||||
"version": "1.2.3",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
"docusaurus": "docusaurus",
|
||||||
@ -15,16 +14,16 @@
|
|||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
"write-heading-ids": "docusaurus write-heading-ids"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.4.3",
|
"@docusaurus/core": "2.4.1",
|
||||||
"@docusaurus/preset-classic": "2.4.3",
|
"@docusaurus/preset-classic": "2.4.1",
|
||||||
"@mdx-js/react": "^1.6.22",
|
"@mdx-js/react": "^1.6.22",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^1.2.0",
|
||||||
"prism-react-renderer": "^1.3.5",
|
"prism-react-renderer": "^1.3.5",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "3.2.1"
|
"@docusaurus/module-type-aliases": "2.4.1"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
RECORD_FILE=tmp.rf.$$
|
|
||||||
CONFIG_FILE=`mktemp`
|
|
||||||
|
|
||||||
CERC_APP_TYPE=${CERC_APP_TYPE:-"webapp"}
|
|
||||||
CERC_REPO_REF=${CERC_REPO_REF:-${GITHUB_SHA:-`git log -1 --format="%H"`}}
|
|
||||||
CERC_IS_LATEST_RELEASE=${CERC_IS_LATEST_RELEASE:-"true"}
|
|
||||||
|
|
||||||
rcd_name=$(jq -r '.name' package.json | sed 's/null//')
|
|
||||||
rcd_desc=$(jq -r '.description' package.json | sed 's/null//')
|
|
||||||
rcd_repository=$(jq -r '.repository' package.json | sed 's/null//')
|
|
||||||
rcd_homepage=$(jq -r '.homepage' package.json | sed 's/null//')
|
|
||||||
rcd_license=$(jq -r '.license' package.json | sed 's/null//')
|
|
||||||
rcd_author=$(jq -r '.author' package.json | sed 's/null//')
|
|
||||||
rcd_app_version=$(jq -r '.version' package.json | sed 's/null//')
|
|
||||||
|
|
||||||
cat <<EOF > "$CONFIG_FILE"
|
|
||||||
services:
|
|
||||||
cns:
|
|
||||||
restEndpoint: '${CERC_REGISTRY_REST_ENDPOINT:-http://23.111.69.218:1317}'
|
|
||||||
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://lx-daemon.audubon.app/api}'
|
|
||||||
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
|
|
||||||
gas: 9550000
|
|
||||||
fees: 500000aphoton
|
|
||||||
EOF
|
|
||||||
|
|
||||||
next_ver=$(laconic -c $CONFIG_FILE cns record list --type ApplicationRecord --all --name "$rcd_name" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$CERC_REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}')
|
|
||||||
|
|
||||||
if [ -z "$next_ver" ] || [ "1" == "$next_ver" ]; then
|
|
||||||
next_ver=0.0.1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF | sed '/.*: ""$/d' > "$RECORD_FILE"
|
|
||||||
record:
|
|
||||||
type: ApplicationRecord
|
|
||||||
version: ${next_ver}
|
|
||||||
name: "$rcd_name"
|
|
||||||
description: "$rcd_desc"
|
|
||||||
homepage: "$rcd_homepage"
|
|
||||||
license: "$rcd_license"
|
|
||||||
author: "$rcd_author"
|
|
||||||
repository:
|
|
||||||
- "$rcd_repository"
|
|
||||||
repository_ref: "$CERC_REPO_REF"
|
|
||||||
app_version: "$rcd_app_version"
|
|
||||||
app_type: "$CERC_APP_TYPE"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
cat $RECORD_FILE
|
|
||||||
RECORD_ID=$(laconic -c $CONFIG_FILE cns record publish --filename $RECORD_FILE --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} | jq -r '.id')
|
|
||||||
echo $RECORD_ID
|
|
||||||
|
|
||||||
if [ -z "$CERC_REGISTRY_APP_CRN" ]; then
|
|
||||||
authority=$(echo "$rcd_name" | cut -d'/' -f1 | sed 's/@//')
|
|
||||||
app=$(echo "$rcd_name" | cut -d'/' -f2-)
|
|
||||||
CERC_REGISTRY_APP_CRN="crn://$authority/applications/$app"
|
|
||||||
fi
|
|
||||||
|
|
||||||
laconic -c $CONFIG_FILE cns name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_CRN@${rcd_app_version}" "$RECORD_ID"
|
|
||||||
laconic -c $CONFIG_FILE cns name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_CRN@${CERC_REPO_REF}" "$RECORD_ID"
|
|
||||||
if [ "true" == "$CERC_IS_LATEST_RELEASE" ]; then
|
|
||||||
laconic -c $CONFIG_FILE cns name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_CRN" "$RECORD_ID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $RECORD_FILE $CONFIG_FILE
|
|
@ -1,56 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
RECORD_FILE=tmp.rf.$$
|
|
||||||
CONFIG_FILE=`mktemp`
|
|
||||||
|
|
||||||
rcd_name=$(jq -r '.name' package.json | sed 's/null//' | sed 's/^@//')
|
|
||||||
rcd_app_version=$(jq -r '.version' package.json | sed 's/null//')
|
|
||||||
|
|
||||||
cat <<EOF > "$CONFIG_FILE"
|
|
||||||
services:
|
|
||||||
cns:
|
|
||||||
restEndpoint: '${CERC_REGISTRY_REST_ENDPOINT:-http://23.111.69.218:1317}'
|
|
||||||
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://lx-daemon.audubon.app/api}'
|
|
||||||
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
|
|
||||||
gas: 550000
|
|
||||||
fees: 200000aphoton
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ -z "$CERC_REGISTRY_APP_CRN" ]; then
|
|
||||||
authority=$(echo "$rcd_name" | cut -d'/' -f1 | sed 's/@//')
|
|
||||||
app=$(echo "$rcd_name" | cut -d'/' -f2-)
|
|
||||||
CERC_REGISTRY_APP_CRN="crn://$authority/applications/$app"
|
|
||||||
fi
|
|
||||||
|
|
||||||
APP_RECORD=$(laconic -c $CONFIG_FILE cns name resolve "$CERC_REGISTRY_APP_CRN" | jq '.[0]')
|
|
||||||
if [ -z "$APP_RECORD" ] || [ "null" == "$APP_RECORD" ]; then
|
|
||||||
echo "No record found for $CERC_REGISTRY_APP_CRN."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF | sed '/.*: ""$/d' > "$RECORD_FILE"
|
|
||||||
record:
|
|
||||||
type: ApplicationDeploymentRequest
|
|
||||||
version: 1.0.0
|
|
||||||
name: "$rcd_name@$rcd_app_version"
|
|
||||||
application: "$CERC_REGISTRY_APP_CRN@$rcd_app_version"
|
|
||||||
dns: "$CERC_REGISTRY_DEPLOYMENT_SHORT_HOSTNAME"
|
|
||||||
deployment: "$CERC_REGISTRY_DEPLOYMENT_CRN"
|
|
||||||
config:
|
|
||||||
env:
|
|
||||||
# this overrides the setting in `.env`
|
|
||||||
CERC_WEBAPP_DEBUG: "$rcd_app_version"
|
|
||||||
CERC_MAX_GENERATE_TIME: "600"
|
|
||||||
meta:
|
|
||||||
note: "Added by CI @ `date`"
|
|
||||||
repository: "`git remote get-url origin`"
|
|
||||||
repository_ref: "${GITHUB_SHA:-`git log -1 --format="%H"`}"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat $RECORD_FILE
|
|
||||||
RECORD_ID=$(laconic -c $CONFIG_FILE cns record publish --filename $RECORD_FILE --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} | jq -r '.id')
|
|
||||||
echo $RECORD_ID
|
|
||||||
|
|
||||||
rm -f $RECORD_FILE $CONFIG_FILE
|
|
Loading…
Reference in New Issue
Block a user