Skip to content

Commit

Permalink
dydx test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
sampocs committed Dec 22, 2023
1 parent 56a534c commit 0d9afdc
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 146 deletions.
26 changes: 26 additions & 0 deletions interchaintest/stride/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM golang:1.21-alpine AS builder

WORKDIR /opt/

RUN set -eux; apk add --no-cache ca-certificates build-base git linux-headers

RUN git clone https://github.com/Stride-Labs/v4-chain.git \
&& cd v4-chain/protocol \
&& git checkout fafd3a9e2083180d7f7809f5080897e714e52bec

WORKDIR /opt/v4-chain/protocol

RUN make build

FROM alpine:3.16
COPY --from=builder /opt/v4-chain/protocol/build/dydxprotocold /usr/local/bin/
RUN apk add bash vim \
&& addgroup -g 1000 dydx \
&& adduser -S -h /var/cosmos-chain/dydx -D dydx -u 1000 -G dydx

USER 1000
WORKDIR /var/cosmos-chain/dydx

EXPOSE 26657 26656 1317 9090

CMD ["dydxprotocold", "start"]
5 changes: 5 additions & 0 deletions interchaintest/stride/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build-docker:
docker build --tag stride:dydx-interchain .

test:
go test -timeout 15m -run ^TestScenarioStrideICAandICQ$$ github.com/cosmos/relayer/v2/interchaintest/stride -race -v -count=1
12 changes: 12 additions & 0 deletions interchaintest/stride/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ func ModifyGenesisStrideCounterparty() func(ibc.ChainConfig, []byte) ([]byte, er
return nil, err
}

// if err := dyno.Set(g, []string{},
// "app_state", "prices", "market_params",
// ); err != nil {
// return nil, err
// }

// if err := dyno.Set(g, []string{},
// "app_state", "prices", "market_prices",
// ); err != nil {
// return nil, err
// }

out, err := json.Marshal(g)
if err != nil {
return nil, fmt.Errorf("failed to marshal genesis bytes to json: %w", err)
Expand Down
Loading

0 comments on commit 0d9afdc

Please sign in to comment.