forked from cerc-io/cosmos-explorer
Compare commits
No commits in common. "testnet-deploy" and "master" have entirely different histories.
testnet-de
...
master
21
.github/workflows/config-check.yaml
vendored
Normal file
21
.github/workflows/config-check.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
name: Config Checker
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: [ master ]
|
||||
pull_request:
|
||||
# branches: [ master ]
|
||||
paths:
|
||||
- 'chains/mainnet/**'
|
||||
- 'chains/testnet/**'
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Check Blockchain Config
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Git Checkout Latest
|
||||
uses: actions/checkout@v3
|
||||
- name: Check Chain Configs
|
||||
uses: ping-pub/ping-dashboard-config-checker@v1.0
|
51
.github/workflows/docker.yaml
vendored
Normal file
51
.github/workflows/docker.yaml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master-backup'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
# -
|
||||
# name: Set up QEMU
|
||||
# uses: docker/setup-qemu-action@v1
|
||||
# -
|
||||
# name: Set up Docker Buildx
|
||||
# uses: docker/setup-buildx-action@v1
|
||||
- name: Install
|
||||
run: yarn install
|
||||
- name: Build
|
||||
run: yarn run vue-cli-service build
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: |
|
||||
yaoling/wallet
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=sha
|
||||
type=schedule
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
28
.github/workflows/mainnet-deploy.yaml.disabled
vendored
Normal file
28
.github/workflows/mainnet-deploy.yaml.disabled
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
name: Deploy to ping.pub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master2 ]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Ping deploy
|
||||
runs-on: mainnet
|
||||
steps:
|
||||
- name: Environment
|
||||
run: export NODE_OPTIONS="--max_old_space_size=4096"
|
||||
|
||||
- name: Git Checkout Latest
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install
|
||||
run: yarn install --ignore-engines
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
- name: Deploy
|
||||
run: cp -rf ./dist/* /var/www/html/
|
39
.github/workflows/publish.yaml
vendored
39
.github/workflows/publish.yaml
vendored
@ -1,39 +0,0 @@
|
||||
name: Publish ApplicationRecord to Registry
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- '*'
|
||||
|
||||
env:
|
||||
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_VAASL_LACONIC_USER_KEY }}
|
||||
CERC_REGISTRY_BOND_ID: ${{ secrets.CICD_VAASL_LACONIC_BOND_ID }}
|
||||
CERC_REGISTRY_DEPLOYMENT_HOSTNAME: ${{ vars.CERC_REGISTRY_DEPLOYMENT_HOSTNAME }}
|
||||
CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_USER_KEY }}
|
||||
CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_BOND_ID }}
|
||||
CERC_REGISTRY_DEPLOYMENT_REQUEST_PAYMENT_TO: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_PAYMENT_TO }}
|
||||
|
||||
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
|
||||
- name: "Enable Yarn"
|
||||
run: corepack enable
|
||||
- name: "Install registry CLI"
|
||||
run: |
|
||||
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||
npm install -g @cerc-io/laconic-registry-cli
|
||||
- name: "Install jq"
|
||||
run: apt -y update && apt -y install jq
|
||||
- name: "Publish Application Record"
|
||||
run: scripts/publish-app-record.sh
|
||||
- name: "Request Deployment"
|
||||
run: scripts/request-app-deployment.sh
|
27
.github/workflows/testnet-deploy.yaml
vendored
Normal file
27
.github/workflows/testnet-deploy.yaml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
name: Testnet Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ testnet ]
|
||||
pull_request:
|
||||
branches: [ testnet ]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Ping deploy
|
||||
runs-on: testnet
|
||||
steps:
|
||||
- name: print
|
||||
run: echo ${GITHUB_REF#refs/heads/}
|
||||
- name: Git Checkout Latest
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install
|
||||
run: yarn install
|
||||
|
||||
- name: Build
|
||||
run: yarn run vue-cli-service build
|
||||
|
||||
- name: Deploy
|
||||
run: cp -rf ./dist/* /var/www/html/
|
74
chains/mainnet/axelar.json
Normal file
74
chains/mainnet/axelar.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"chain_name": "axelar",
|
||||
"api": [
|
||||
"https://rest.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe"
|
||||
],
|
||||
"rpc": [
|
||||
"https://tm.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe"
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.45.6",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
"addr_prefix": "axelar",
|
||||
"logo": "/logos/axelar.svg",
|
||||
"theme_color": "#161723",
|
||||
"assets": [
|
||||
{
|
||||
"base": "uaxl",
|
||||
"symbol": "AXL",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "axelar",
|
||||
"logo": "/logos/axelar.svg"
|
||||
},
|
||||
{
|
||||
"base": "uusdc",
|
||||
"symbol": "axlUSDC",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "usd-coin",
|
||||
"logo": "/logos/usdc.svg"
|
||||
},
|
||||
{
|
||||
"base": "uusdt",
|
||||
"symbol": "axlUSDT",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "tether",
|
||||
"logo": "/logos/usdt.svg"
|
||||
},
|
||||
{
|
||||
"base": "dai-wei",
|
||||
"symbol": "axlDAI",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "dai",
|
||||
"logo": "/logos/dai.svg"
|
||||
},
|
||||
{
|
||||
"base": "weth-wei",
|
||||
"symbol": "axlWETH",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "ethereum",
|
||||
"logo": "/logos/weth.svg"
|
||||
},
|
||||
{
|
||||
"base": "wmatic-wei",
|
||||
"symbol": "axlWMATIC",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "matic-network",
|
||||
"logo": "/logos/wmatic.svg"
|
||||
},
|
||||
{
|
||||
"base": "wavax-wei",
|
||||
"symbol": "axlWAVAX",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "avalanche-2",
|
||||
"logo": "/logos/wavax.svg"
|
||||
},
|
||||
{
|
||||
"base": "dot-planck",
|
||||
"symbol": "axlDOT",
|
||||
"exponent": "10",
|
||||
"coingecko_id": "polkadot",
|
||||
"logo": "/logos/dot.svg"
|
||||
}
|
||||
]
|
||||
}
|
31
chains/mainnet/cosmos.json
Normal file
31
chains/mainnet/cosmos.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"chain_name": "cosmos",
|
||||
"registry_name": "cosmoshub",
|
||||
"api": [
|
||||
{"provider": "notional", "address": "https://api-cosmoshub-ia.cosmosia.notional.ventures"},
|
||||
{"provider": "blockapsis", "address": "https://lcd-cosmoshub.blockapsis.com:443"},
|
||||
{"provider": "WhisperNode🤐", "address": "https://lcd-cosmoshub.whispernode.com:443"},
|
||||
{"provider": "pupmos", "address": "https://api-cosmoshub.pupmos.network"},
|
||||
{"provider": "publicnode", "address": "https://cosmos-rest.publicnode.com"},
|
||||
{"provider": "staketab", "address": "https://cosmos-rest.staketab.org"},
|
||||
{"provider": "nodestake", "address": "https://api.cosmos.nodestake.top"},
|
||||
{"provider": "Golden Ratio Staking", "address": "https://rest-cosmoshub.goldenratiostaking.net"}
|
||||
],
|
||||
"rpc": [
|
||||
{"provider": "icycro", "address": "https://cosmos-rpc.icycro.org"},
|
||||
{"provider": "dragonstake", "address": "https://rpc.cosmos.dragonstake.io"},
|
||||
{"provider": "Golden Ratio Staking", "address": "https://rpc-cosmoshub.goldenratiostaking.net"}
|
||||
],
|
||||
"sdk_version": "0.45.1",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
"addr_prefix": "cosmos",
|
||||
"logo": "/logos/cosmos.svg",
|
||||
"assets": [{
|
||||
"base": "uatom",
|
||||
"symbol": "ATOM",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "cosmos",
|
||||
"logo": "/logos/cosmos.svg"
|
||||
}]
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"chain_name": "laconic_9000-1",
|
||||
"registry_name": "laconic_9000-1",
|
||||
"api": [
|
||||
{"provider": "test-api-prov", "address": "https://laconicd.laconic.com/api"}
|
||||
],
|
||||
"rpc": [
|
||||
{"provider": "test-rpc-prov", "address": "https://laconicd.laconic.com"}
|
||||
],
|
||||
"sdk_version": "0.50.3",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
"addr_prefix": "laconic",
|
||||
"logo": "/logos/cosmos.svg",
|
||||
"assets": [{
|
||||
"base": "alnt",
|
||||
"symbol": "LNT",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "cosmos",
|
||||
"logo": "/logos/cosmos.svg"
|
||||
}]
|
||||
}
|
30
chains/mainnet/neutron.json
Normal file
30
chains/mainnet/neutron.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"chain_name": "neutron",
|
||||
"api": [
|
||||
{"provider": "Polkachu", "address": "https://neutron-api.polkachu.com"},
|
||||
{"provider": "NodeStake", "address": "https://api.neutron.nodestake.top"},
|
||||
{"provider": "Allnodes", "address": "https://neutron-rest.publicnode.com"}
|
||||
],
|
||||
"rpc": [
|
||||
{"provider": "Polkachu", "address": "https://neutron-rpc.polkachu.com"},
|
||||
{"provider": "NodeStake", "address": "https://rpc.neutron.nodestake.top"},
|
||||
{"provider": "Allnodes", "address": "https://neutron-rpc.publicnode.com:443"}
|
||||
],
|
||||
"provider_chain": {
|
||||
"api": ["https://api-cosmoshub-ia.cosmosia.notional.ventures"]
|
||||
},
|
||||
"features": ["dashboard", "blocks", "ibc", "cosmwasm", "uptime", "parameters", "state-sync", "consensus", "supply", "widget"],
|
||||
"sdk_version": "0.45.1",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "8000",
|
||||
"assets": [{
|
||||
"base": "untrn",
|
||||
"symbol": "NTRN",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "neutron",
|
||||
"logo": "/logos/neutron.svg"
|
||||
}],
|
||||
"addr_prefix": "neutron",
|
||||
"theme_color": "#161723",
|
||||
"logo": "/logos/neutron.svg"
|
||||
}
|
27
chains/mainnet/nolus.json
Normal file
27
chains/mainnet/nolus.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"chain_name": "nolus",
|
||||
"coingecko": "nolus",
|
||||
"api": [
|
||||
{"provider": "Nolus", "address": "https://pirin-cl.nolus.network:1317"},
|
||||
{"provider": "LavenderFive", "address": "https://nolus-api.lavenderfive.com:443"},
|
||||
{"provider": "Allnodes", "address": "https://nolus-rest.publicnode.com"}
|
||||
],
|
||||
"rpc": [
|
||||
{"provider": "Nolus", "address": "https://pirin-cl.nolus.network:26657"},
|
||||
{"provider": "LavenderFive", "address": "https://nolus-rpc.lavenderfive.com:443"},
|
||||
{"provider": "Allnodes", "address": "https://nolus-rpc.publicnode.com:443"}
|
||||
],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "v0.47.6",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "0",
|
||||
"addr_prefix": "nolus",
|
||||
"logo": "/logos/nolus.svg",
|
||||
"assets": [{
|
||||
"base": "unls",
|
||||
"symbol": "NLS",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "nolus",
|
||||
"logo": "/logos/nolus.svg"
|
||||
}]
|
||||
}
|
32
chains/mainnet/osmosis.json
Normal file
32
chains/mainnet/osmosis.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"chain_name": "osmosis",
|
||||
"coingecko": "osmosis",
|
||||
"api": ["https://lcd.osmosis.zone","https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"],
|
||||
"rpc": ["https://rpc.osmosis.zone", "https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.1",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "800",
|
||||
"addr_prefix": "osmo",
|
||||
"logo": "/logos/osmosis.jpg",
|
||||
"theme_color": "#812cd6",
|
||||
"assets": [{
|
||||
"base": "uosmo",
|
||||
"symbol": "OSMO",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "osmosis",
|
||||
"logo": "/logos/osmosis.jpg"
|
||||
},{
|
||||
"base": "uion",
|
||||
"symbol": "ION",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "ion",
|
||||
"logo": "/logos/osmosis.jpg"
|
||||
},{
|
||||
"base": "usomm",
|
||||
"symbol": "SOMM",
|
||||
"exponent": "6",
|
||||
"coingecko_id": "somm",
|
||||
"logo": ""
|
||||
}]
|
||||
}
|
11
chains/testnet/crossfi.json
Normal file
11
chains/testnet/crossfi.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"chain_name": "crossfi-testnet-1",
|
||||
"api": ["https://crossfi-testnet-api.forpeaky.xyz"],
|
||||
"rpc": ["https://crossfi-testnet-rpc.forpeaky.xyz"],
|
||||
"coingecko": "",
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.47.1",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "500",
|
||||
"addr_prefix": "crossfi"
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "@lcn-demo/ping.pub",
|
||||
"version": "3.0.1",
|
||||
"repository": "https://git.vdb.to/zramsay/cosmos-explorer",
|
||||
"name": "ping.pub",
|
||||
"version": "3.0.0",
|
||||
"private": true,
|
||||
"target": "",
|
||||
"scripts": {
|
||||
@ -14,8 +13,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@chenfengyuan/vue-countdown": "2",
|
||||
"@cosmjs/amino": "^0.32.3",
|
||||
"@cosmjs/crypto": "^0.32.3",
|
||||
"@cosmjs/amino": "^0.32.3",
|
||||
"@cosmjs/encoding": "^0.32.3",
|
||||
"@cosmjs/stargate": "^0.32.3",
|
||||
"@iconify/vue": "^4.1.0",
|
||||
@ -45,8 +44,6 @@
|
||||
"pinia": "^2.0.28",
|
||||
"postcss": "^8.4.23",
|
||||
"qrcode": "^1.5.3",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"tailwindcss": "^3.3.1",
|
||||
"theme-change": "^2.5.0",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
|
@ -1,69 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
RECORD_FILE=tmp.rf.$$
|
||||
CONFIG_FILE=`mktemp`
|
||||
|
||||
CERC_APP_TYPE=${CERC_APP_TYPE:-"webapp/next"}
|
||||
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:
|
||||
registry:
|
||||
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-https://laconicd.laconic.com}'
|
||||
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://laconicd.laconic.com/api}'
|
||||
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
|
||||
gas: 900000
|
||||
fees: 1900000alnt
|
||||
EOF
|
||||
|
||||
next_ver=$(laconic -c $CONFIG_FILE registry 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 registry 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_LRN" ]; then
|
||||
authority=$(echo "$rcd_name" | cut -d'/' -f1 | sed 's/@//')
|
||||
app=$(echo "$rcd_name" | cut -d'/' -f2-)
|
||||
CERC_REGISTRY_APP_LRN="lrn://$authority/applications/$app"
|
||||
fi
|
||||
|
||||
laconic -c $CONFIG_FILE registry name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_LRN@${rcd_app_version}" "$RECORD_ID"
|
||||
laconic -c $CONFIG_FILE registry name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_LRN@${CERC_REPO_REF}" "$RECORD_ID"
|
||||
if [ "true" == "$CERC_IS_LATEST_RELEASE" ]; then
|
||||
laconic -c $CONFIG_FILE registry name set --user-key "${CERC_REGISTRY_USER_KEY}" --bond-id ${CERC_REGISTRY_BOND_ID} "$CERC_REGISTRY_APP_LRN" "$RECORD_ID"
|
||||
fi
|
||||
|
||||
rm -f $RECORD_FILE $CONFIG_FILE
|
@ -1,67 +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:
|
||||
registry:
|
||||
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-https://laconicd.laconic.com}'
|
||||
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://laconicd.laconic.com/api}'
|
||||
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
|
||||
gas: 900000
|
||||
fees: 900000alnt
|
||||
EOF
|
||||
|
||||
if [ -z "$CERC_REGISTRY_APP_LRN" ]; then
|
||||
authority=$(echo "$rcd_name" | cut -d'/' -f1 | sed 's/@//')
|
||||
app=$(echo "$rcd_name" | cut -d'/' -f2-)
|
||||
CERC_REGISTRY_APP_LRN="lrn://$authority/applications/$app"
|
||||
fi
|
||||
|
||||
PAYMENT_TX=$(laconic -c $CONFIG_FILE registry tokens send \
|
||||
--address laconic13eq42rat3aurnfj6pu32yl00zyhl8sent97efe \
|
||||
--user-key "${CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY}" \
|
||||
--bond-id "${CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID}" \
|
||||
--type alnt \
|
||||
--quantity ${CERC_REGISTRY_DEPLOYMENT_REQUEST_PAYMENT_AMOUNT:-10000} | jq '.tx.hash')
|
||||
|
||||
APP_RECORD=$(laconic -c $CONFIG_FILE registry name resolve "$CERC_REGISTRY_APP_LRN" | jq '.[0]')
|
||||
if [ -z "$APP_RECORD" ] || [ "null" == "$APP_RECORD" ]; then
|
||||
echo "No record found for $CERC_REGISTRY_APP_LRN."
|
||||
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_LRN@$rcd_app_version"
|
||||
dns: "$CERC_REGISTRY_DEPLOYMENT_HOSTNAME"
|
||||
deployment: "$CERC_REGISTRY_DEPLOYMENT_LRN"
|
||||
to: laconic13eq42rat3aurnfj6pu32yl00zyhl8sent97efe
|
||||
payment: $PAYMENT_TX
|
||||
config:
|
||||
env:
|
||||
CERC_WEBAPP_DEBUG: "$rcd_app_version"
|
||||
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 registry record publish \
|
||||
--filename $RECORD_FILE \
|
||||
--user-key "${CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY}" \
|
||||
--bond-id ${CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID} | jq -r '.id')
|
||||
echo $RECORD_ID
|
||||
|
||||
rm -f $RECORD_FILE $CONFIG_FILE
|
31
yarn.lock
31
yarn.lock
@ -5122,7 +5122,7 @@ jiti@^1.18.2, jiti@^1.19.1, jiti@^1.19.3:
|
||||
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.20.0.tgz#2d823b5852ee8963585c8dd8b7992ffc1ae83b42"
|
||||
integrity sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==
|
||||
|
||||
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
|
||||
js-tokens@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||
@ -5318,13 +5318,6 @@ long@^5.2.0, long@^5.2.1, long@^5.2.3:
|
||||
resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1"
|
||||
integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==
|
||||
|
||||
loose-envify@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
|
||||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
|
||||
dependencies:
|
||||
js-tokens "^3.0.0 || ^4.0.0"
|
||||
|
||||
lru-cache@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
|
||||
@ -6288,21 +6281,6 @@ rc9@^2.1.1:
|
||||
destr "^2.0.0"
|
||||
flat "^5.0.2"
|
||||
|
||||
react-dom@^18.3.1:
|
||||
version "18.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
|
||||
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
scheduler "^0.23.2"
|
||||
|
||||
react@^18.3.1:
|
||||
version "18.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
|
||||
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
read-cache@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
|
||||
@ -6542,13 +6520,6 @@ sass@^1.58.0:
|
||||
immutable "^4.0.0"
|
||||
source-map-js ">=0.6.2 <2.0.0"
|
||||
|
||||
scheduler@^0.23.2:
|
||||
version "0.23.2"
|
||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
|
||||
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
|
||||
dependencies:
|
||||
loose-envify "^1.1.0"
|
||||
|
||||
scule@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/scule/-/scule-1.0.0.tgz#895e6f4ba887e78d8b9b4111e23ae84fef82376d"
|
||||
|
Loading…
Reference in New Issue
Block a user