Skip to content

Commit a18069f

Browse files
authored
Merge pull request #18 from aragon/f/improved-makefile-helpers
Improved makefile helpers
2 parents ae724c1 + 18fb09b commit a18069f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,18 @@ refund: ## Refund the remaining balance left on the deployment account
268268
--value $$REMAINING \
269269
$(REFUND_ADDRESS)
270270

271-
# Troubleshooting and helpers
271+
# Other: Helpers and troubleshooting
272272

273273
.PHONY: gas-price
274274
gas-price:
275-
cast gas-price --rpc-url $(RPC_URL)
275+
@echo "Gas price ($(NETWORK_NAME)):"
276+
@cast gas-price --rpc-url $(RPC_URL)
277+
278+
.PHONY: balance
279+
balance:
280+
@echo "Balance of $(DEPLOYMENT_ADDRESS) ($(NETWORK_NAME)):"
281+
@BALANCE=$$(cast balance $(DEPLOYMENT_ADDRESS) --rpc-url $(RPC_URL)) && \
282+
cast --to-unit $$BALANCE ether
276283

277284
.PHONY: clean-nonces
278285
clean-nonces:
@@ -285,5 +292,5 @@ clean-nonce:
285292
cast send --private-key $(DEPLOYMENT_PRIVATE_KEY) \
286293
--rpc-url $(RPC_URL) \
287294
--value 0 \
288-
--nonce $(nonce) \
295+
--nonce $(nonce) \
289296
$(DEPLOYMENT_ADDRESS)

0 commit comments

Comments
 (0)