Skip to content

Commit 4bd6445

Browse files
authored
Merge pull request #692 from nowooj/feat/support-evm-rpc
feat: support evm-rest-rpc's port forward
2 parents ee52535 + 2d0efa5 commit 4bd6445

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

starship/charts/devnet/scripts/evm/update-genesis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sed -i -e "s/\"stake\"/\"$DENOM\"/g" $CHAIN_DIR/config/genesis.json
1313
sed -i "s/\"time_iota_ms\": \".*\"/\"time_iota_ms\": \"$TIME_IOTA_MS\"/" $CHAIN_DIR/config/genesis.json
1414

1515
echo "Update max gas param"
16-
jq -r '.consensus_params.block.max_gas |= "100000000000"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json
16+
jq -r '.consensus.params.block.max_gas |= "100000000000"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json
1717

1818
echo "Update staking unbonding time and slashing jail time"
1919
jq -r '.app_state.staking.params.unbonding_time |= "300s"' $CHAIN_DIR/config/genesis.json > /tmp/genesis.json; mv /tmp/genesis.json $CHAIN_DIR/config/genesis.json

starship/scripts/port-forward.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ if [[ $num_chains -gt -1 ]]; then
8080
locallcd=$(yq -r ".chains[$i].ports.rest" ${CONFIGFILE} )
8181
localexp=$(yq -r ".chains[$i].ports.exposer" ${CONFIGFILE})
8282
localfaucet=$(yq -r ".chains[$i].ports.faucet" ${CONFIGFILE})
83+
localethereumrest=$(yq -r ".chains[$i].ports.evm-http-jsonrpc" ${CONFIGFILE})
8384
color yellow "chains: forwarded $chain"
8485
if [[ $(yq -r ".chains[$i].cometmock.enabled" $CONFIGFILE) == "true" ]];
8586
then
@@ -92,6 +93,7 @@ if [[ $num_chains -gt -1 ]]; then
9293
[[ "$locallcd" != "null" ]] && color yellow " lcd to http://localhost:$locallcd" && kubectl port-forward pods/$chain-genesis-0 $locallcd:$CHAIN_LCD_PORT > /dev/null 2>&1 &
9394
[[ "$localexp" != "null" ]] && color yellow " exposer to http://localhost:$localexp" && kubectl port-forward pods/$chain-genesis-0 $localexp:$CHAIN_EXPOSER_PORT > /dev/null 2>&1 &
9495
[[ "$localfaucet" != "null" ]] && color yellow " faucet to http://localhost:$localfaucet" && kubectl port-forward pods/$chain-genesis-0 $localfaucet:$CHAIN_FAUCET_PORT > /dev/null 2>&1 &
96+
[[ "$localethereumrest" != "null" ]] && color yellow " ethereum rest to http://localhost:$localethereumrest" && kubectl port-forward pods/$chain-genesis-0 $localethereumrest:$ETHEREUM_REST_PORT > /dev/null 2>&1 &
9597
sleep 1
9698
fi
9799
done

starship/tests/e2e/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ HELM_CHART ?= devnet
99
###############################################################################
1010

1111
.PHONY: start
12-
start: install port-forward
12+
start: install
13+
@echo "Waiting for all pods to be ready..."
14+
@kubectl wait --for=condition=ready pod --all --timeout=300s
15+
@make port-forward
1316

1417
.PHONY: stop
1518
stop: stop-forward delete
@@ -42,7 +45,7 @@ test:
4245
### Port forward ###
4346
###############################################################################
4447

45-
.PHOY: port-forward
48+
.PHONY: port-forward
4649
port-forward:
4750
$(CURDIR)/../../scripts/port-forward.sh --config=$(HELM_FILE)
4851

starship/tests/e2e/configs/xpla.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ chains:
1313
exposer: 8081
1414
faucet: 8000
1515
grpc-web: 9091
16+
grpc: 9090
17+
evm-http-jsonrpc: 8545
1618
resources:
1719
cpu: "0.5"
1820
memory: 500M

0 commit comments

Comments
 (0)