Skip to content

Commit 8b03e17

Browse files
authored
Merge pull request #40 from Agoric/ms/autoUpdate-deployer-address
Auto Update Deployer Address
2 parents d3144de + 8935e55 commit 8b03e17

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

contract/Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ BLD=000000ubld
66
ATOM_DENOM=ibc/BA313C4A19DFBF943586C0387E6B11286F9E416B4DD27574E6909CABE0E342FA
77
ATOM=000000$(ATOM_DENOM)
88

9-
# your deployer address made from make add-address
10-
# ADDR=agoric1k78s7qz7rxy8afyjrqk3dntg8m83zaw3upe60p
11-
ADDR=agoric125d8s0tamx50gpqdd3m7f5gtkzkcnjs0ehsujr
9+
10+
# fetch the address of the deployer account from the chain - you may need to adjust this to match your setup
11+
USERNAME ?= user1
12+
13+
ADDR := $(shell kubectl exec -i agoriclocal-genesis-0 -c validator -- sh -c '\
14+
if ! agd keys show $(USERNAME) >/dev/null 2>&1; then \
15+
agd keys add $(USERNAME) --output json; \
16+
else \
17+
agd keys show $(USERNAME) --output json; \
18+
fi' | jq -r ".address" \
19+
)
20+
21+
$(info USERNAME is $(USERNAME))
22+
$(info ADDR is $(ADDR))
1223

1324
PROVISION_POOL_ADDR=agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346
1425

0 commit comments

Comments
 (0)