Skip to content

Commit

Permalink
[GATEWAY] Makefile target added to send relays to grove gateway (#487)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Olshansky <[email protected]>
  • Loading branch information
ezeike and Olshansk committed Apr 30, 2024
1 parent 58d014b commit b8c38bb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ GATEWAY_URL ?= http://localhost:42079
POCKET_ADDR_PREFIX = pokt
CHAIN_ID = poktroll

# The domain ending in ".town" is staging, ".city" is production
GROVE_GATEWAY_STAGING_ETH_MAINNET = https://eth-mainnet.rpc.grove.town
# The "protocol" field here instructs the Grove gateway which network to use
JSON_RPC_DATA_ETH_BLOCK_HEIGHT = '{"protocol": "shannon-testnet","jsonrpc":"2.0","id":"0","method":"eth_blockNumber", "params": []}'

# On-chain module account addresses. Search for `func TestModuleAddress` in the
# codebase to get an understanding of how we got these values.
APPLICATION_MODULE_ADDRESS = pokt1rl3gjgzexmplmds3tq3r3yk84zlwdl6djzgsvm
Expand Down Expand Up @@ -823,4 +828,14 @@ act_list: check_act ## List all github actions that can be executed locally with
act_reviewdog: check_act check_gh ## Run the reviewdog workflow locally like so: `GITHUB_TOKEN=$(gh auth token) make act_reviewdog`
$(eval CONTAINER_ARCH := $(shell make -s detect_arch))
@echo "Detected architecture: $(CONTAINER_ARCH)"
act -v -s GITHUB_TOKEN=$(GITHUB_TOKEN) -W .github/workflows/reviewdog.yml --container-architecture $(CONTAINER_ARCH)
act -v -s GITHUB_TOKEN=$(GITHUB_TOKEN) -W .github/workflows/reviewdog.yml --container-architecture $(CONTAINER_ARCH)

#############################
### Grove Gateway Helpers ###
#############################

.PHONY: grove_staging_eth_block_height
grove_staging_eth_block_height: ## Sends a relay through the staging grove gateway to the eth-mainnet chain. Must have GROVE_STAGING_PORTAL_APP_ID environment variable set.
curl $(GROVE_GATEWAY_STAGING_ETH_MAINNET)/v1/$(GROVE_STAGING_PORTAL_APP_ID) \
-H 'Content-Type: application/json' \
--data $(SHANNON_JSON_RPC_DATA_ETH_BLOCK_HEIGHT)

0 comments on commit b8c38bb

Please sign in to comment.