Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Adding Elys Chain Support #626

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions starship/charts/devnet/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,32 @@ defaultChains:
- --force-clear-db
- --chain-config-file=/etc/config/config.yml
- --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934
elys:
image: ghcr.io/cosmology-tech/starship/elys:v2.0.0
home: /root/.elys
binary: elysd
prefix: elys
denom: uelys
prettyName: Elys
coins: 200000000000000uelys
hdPath: m/44'/118'/0'/0/0
coinType: 118
repo: https://github.com/elys-network/elys
assets:
- base: uelys
description: "The native token of Elys Network."
name: Elys
display: elys
symbol: ELYS
logo_URIs:
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/elys/images/elys.png"
denom_units:
- denom: uelys
exponent: 0
- denom: elys
exponent: 6
coingecko_id: elys-network
keywords: [ "elys-network" ]

defaultRelayers:
ts-relayer:
Expand Down
3 changes: 2 additions & 1 deletion starship/charts/devnet/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@
"kujira",
"hyperweb",
"noble",
"ethereum"
"ethereum",
"elys"
]
},
"numValidators": {
Expand Down
60 changes: 60 additions & 0 deletions starship/docker/chains/Dockerfile.elys
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 1) Build stage: Download the precompiled elysd binary
ARG BASE_IMAGE=golang:1.21-bullseye
FROM ${BASE_IMAGE} AS build-env

ARG VERSION=v2.0.0
ENV BINARY_URL="https://github.com/elys-network/elys/releases/download/${VERSION}/elysd-${VERSION}-linux-amd64.tar.gz"

RUN apt-get update && apt-get install -y ca-certificates curl bash
WORKDIR /tmp/elys

# Download the precompiled tarball
ADD $BINARY_URL elysd.tar.gz
RUN tar xvf elysd.tar.gz \
&& rm elysd.tar.gz \
&& mv elysd /usr/local/bin/elysd


# 2) Final image: minimal Debian, copy elysd from build
FROM debian:stable-slim

# Install packages needed to run + modify genesis.json
RUN apt-get update && apt-get install -y ca-certificates sed jq && rm -rf /var/lib/apt/lists/*

# Copy binary from build stage
COPY --from=build-env /usr/local/bin/elysd /usr/local/bin/elysd

ENV HOME=/root
WORKDIR /root

# Initialize local chain
RUN elysd init mynode --chain-id=elys-local --home /root/.elys

# Replace "stake" with "uelys" (for staking denom)
RUN sed -i 's/"stake"/"uelys"/g' /root/.elys/config/genesis.json

# Inject a uusdc asset profile with jq
# Adjust the JSON path if your module or field names differ
RUN jq '.masterchef.assetProfiles += [{"denom": "uusdc","decimals":6,"description":"USDC bridging or liquidity asset"}]' \
/root/.elys/config/genesis.json > /root/.elys/config/genesis.tmp && \
mv /root/.elys/config/genesis.tmp /root/.elys/config/genesis.json

# Create validator key
RUN elysd keys add validator --keyring-backend test --home /root/.elys

# Give validator enough tokens to exceed the large DefaultPowerReduction
RUN elysd add-genesis-account validator 2000000000000uelys \
--home /root/.elys --keyring-backend test

# Self-delegate a large amount
RUN elysd gentx validator 1000000000000uelys \
--chain-id=elys-local --home /root/.elys --keyring-backend test

# Collect gentxs
RUN elysd collect-gentxs --home /root/.elys

# Expose typical Cosmos SDK ports
EXPOSE 26657 26656 1317 9090

# Start chain
CMD ["elysd", "start", "--home", "/root/.elys"]
5 changes: 5 additions & 0 deletions starship/docker/chains/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,8 @@ chains:
file: Dockerfile.eth-prysmctl
tags:
- v5.2.0
- name: elys
base: golang:1.21-bullseye
file: Dockerfile.elys
tags:
- v2.0.0
42 changes: 42 additions & 0 deletions starship/tests/e2e/configs/elys.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: starship-e2e-tests
version: 1.3.0

chains:
- id: elys-1
name: elys
numValidators: 1 # only support for single validator node for ics
faucet:
enabled: false
ics:
enabled: true
provider: cosmoshub-4
ports:
rest: 1317
rpc: 26657
- id: cosmoshub-4
name: cosmoshub
numValidators: 1 # only support for single validator node for ics
ports:
rest: 1315
rpc: 26655
exposer: 38087
faucet: 8007

relayers:
- name: elys-cosmos
type: hermes
image: ghcr.io/cosmology-tech/starship/hermes:1.10.0
replicas: 1
chains:
- elys-1
- cosmoshub-4
ics:
enabled: true
consumer: elys-1
provider: cosmoshub-4

registry:
enabled: true
ports:
rest: 8081
grpc: 9091