diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index 4bca15f6..da429c50 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -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: diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index b573808e..4ba8f081 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -147,7 +147,8 @@ "kujira", "hyperweb", "noble", - "ethereum" + "ethereum", + "elys" ] }, "numValidators": { diff --git a/starship/docker/chains/Dockerfile.elys b/starship/docker/chains/Dockerfile.elys new file mode 100644 index 00000000..999cf234 --- /dev/null +++ b/starship/docker/chains/Dockerfile.elys @@ -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"] diff --git a/starship/docker/chains/versions.yaml b/starship/docker/chains/versions.yaml index d5a287c9..4d30aaa1 100644 --- a/starship/docker/chains/versions.yaml +++ b/starship/docker/chains/versions.yaml @@ -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 diff --git a/starship/tests/e2e/configs/elys.yaml b/starship/tests/e2e/configs/elys.yaml new file mode 100644 index 00000000..35925725 --- /dev/null +++ b/starship/tests/e2e/configs/elys.yaml @@ -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