Skip to content

Commit

Permalink
Merged TFL station-assets latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
echel0n-HX committed Aug 31, 2023
2 parents 59ebb64 + 66ef409 commit b90be09
Show file tree
Hide file tree
Showing 65 changed files with 1,177 additions and 550 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Docker Build

on:
push:
branches:
- main
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3

# https://docs.docker.com/build/ci/github-actions/multi-platform/
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: |
ghcr.io/${{ github.repository }}
tags: |
type=sha
type=semver,pattern={{tag}}
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build docker image
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
file: Dockerfile
tags: ${{ env.DOCKER_METADATA_OUTPUT_TAGS }}
labels: ${{ env.DOCKER_METADATA_OUTPUT_LABELS }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ dist
# build folder
build

# public folder
public

# OSX files
.DS_Store

Expand Down
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM node:18 as assets-builder

WORKDIR /assets

RUN set -eux && \
git clone https://github.com/terra-money/assets.git ./

RUN set -eux && \
npm install && \
npm run build

###############################################################################
FROM node:18 as station-assets-builder

ARG CF_PAGES_URL="https://station-assets.pages.dev"
ARG FND_BASE_URL="https://finder.station.money"
ENV CF_PAGES_URL=${CF_PAGES_URL}
ENV FND_BASE_URL=${FND_BASE_URL}

WORKDIR /assets

COPY . .

RUN set -eux && \
npm install && \
npm run build

###############################################################################
FROM node:18-alpine

WORKDIR /assets

COPY ./serve.js ./serve.js
COPY --from=station-assets-builder /assets/build/* ./public/
COPY --from=assets-builder /assets/station/*json ./public/station/
COPY --from=assets-builder /assets/ibc/*json ./public/ibc/
COPY --from=assets-builder /assets/cw20/*json ./public/cw20/
COPY --from=assets-builder /assets/extensions.json ./public/extensions.json

RUN set -eux && \
npm init -y && \
npm install cors express && \
mkdir -p /assets/public/img && \
cd /assets/public/img && \
ln -s ../coins coins && \
ln -s ../chains chains

# Expose port 3001
EXPOSE 3001

# Start the Express app
CMD [ "node", "serve.js" ]
51 changes: 41 additions & 10 deletions chains/localterra/localterra.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
module.exports = {
chainID: 'localterra',
lcd: 'http://localhost:1317',
gasAdjustment: 1.75,
gasPrices: { uluna: 0.15 },
gasAdjustment: 5,
gasPrices: {
uluna: 28.325,
usdr: 0.52469,
uusd: 0.75,
ukrw: 850.0,
umnt: 2142.855,
ueur: 0.625,
ucny: 4.9,
ujpy: 81.85,
ugbp: 0.55,
uinr: 54.4,
ucad: 0.95,
uchf: 0.7,
uaud: 0.95,
usgd: 1.0,
uthb: 23.1,
usek: 6.25,
unok: 6.25,
udkk: 4.5,
uidr: 10900.0,
uphp: 38.0,
uhkd: 5.85,
umyr: 3.0,
utwd: 20.0,
},
prefix: 'terra',
coinType: '330',
baseAsset: 'uluna',
name: 'LocalTerra',
icon: process.env.CF_PAGES_URL + '/img/chains/Terra.svg',
icon: process.env.CF_PAGES_URL + '/img/coins/TerraAUDClassic.svg',
explorer: {
address: 'https://finder.terrarebels.net/localterra/address/{}',
tx: 'https://finder.terrarebels.net/localterra/tx/{}',
validator: 'https://finder.terrarebels.net/localterra/validator/{}',
block: 'https://finder.terrarebels.net/localterra/block/{}',
address: 'https://finder.terraclassic.community/localterra/address/{}',
tx: 'https://finder.terraclassic.community/localterra/tx/{}',
validator: 'https://finder.terraclassic.community/localterra/validator/{}',
block: 'https://finder.terraclassic.community/localterra/block/{}',
},
tokens: [
{
token: 'uluna',
symbol: 'LUNA',
name: 'Terra Luna',
icon: process.env.CF_PAGES_URL + '/img/coins/Luna.svg',
symbol: 'LUNC',
name: 'Luna Classic',
icon: process.env.CF_PAGES_URL + '/img/coins/LunaClassic.svg',
decimals: 6,
},
{
token: 'uusd',
symbol: 'USTC',
name: 'TerraUSD Classic',
icon: process.env.CF_PAGES_URL + '/img/coins/TerraUSDClassic.svg',
decimals: 6,
},
],
Expand Down
8 changes: 8 additions & 0 deletions chains/mainnet/akash.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ module.exports = {
// fromTerra: 'channel-45',
// toTerra: 'channel-56',
// },
channels: {
'phoenix-1': 'channel-56',
'cosmoshub-4': 'channel-17',
'crescent-1': 'channel-70',
'juno-1': 'channel-35',
'kaiyo-1': 'channel-63',
'osmosis-1': 'channel-9',
},
explorer: {
address: 'https://www.mintscan.io/akash/account/{}',
tx: 'https://www.mintscan.io/akash/txs/{}',
Expand Down
35 changes: 35 additions & 0 deletions chains/mainnet/archway.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = {
chainID: 'archway-1',
lcd: 'https://api.mainnet.archway.io',
gasAdjustment: 1.75,
gasPrices: { aarch: 1500000000000 },
prefix: 'archway',
coinType: '118',
baseAsset: 'aarch',
name: 'Archway',
icon: process.env.CF_PAGES_URL + '/img/chains/Archway.png',
ibc: {},
channels: {
'axelar-dojo-1': 'channel-13',
'cosmoshub-4': 'channel-0',
'kaiyo-1': 'channel-11',
'osmosis-1': 'channel-1',
'juno-1': 'channel-15',
'crescent-1': 'channel-6',
},
explorer: {
address: 'https://www.mintscan.io/archway/account/{}',
tx: 'https://www.mintscan.io/archway/txs/{}',
validator: 'https://www.mintscan.io/archway/validators/{}',
block: 'https://www.mintscan.io/archway/blocks/id/{}',
},
tokens: [
{
token: 'aarch',
symbol: 'ARCH',
name: 'Archway',
icon: process.env.CF_PAGES_URL + '/img/coins/Aarch.png',
decimals: 18,
},
],
}
16 changes: 15 additions & 1 deletion chains/mainnet/axelar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ module.exports = {
fromTerra: 'channel-19',
toTerra: 'channel-0',
},
channels: {
'columbus-5': 'channel-0',
'phoenix-1': 'channel-11',
'kaiyo-1': 'channel-14',
'crescent-1': 'channel-7',
'juno-1': 'channel-4',
'osmosis-1': 'channel-3',
'cosmoshub-4': 'channel-2',
'carbon-1': 'channel-37',
'comdex-1': 'channel-31',
'stride-1': 'channel-64',
'pacific-1': 'channel-103',
'archway-1': 'channel-111',
},
explorer: {
address: 'https://www.mintscan.io/axelar/account/{}',
tx: 'https://www.mintscan.io/axelar/txs/{}',
Expand Down Expand Up @@ -254,4 +268,4 @@ module.exports = {
decimals: 18,
},
],
}
}
Loading

0 comments on commit b90be09

Please sign in to comment.