Skip to content

Commit 880b390

Browse files
committed
chore: USERNAME variable for ADDR
1 parent 0b5ee04 commit 880b390

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

contract/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ ATOM=000000$(ATOM_DENOM)
88

99

1010
# fetch the address of the deployer account from the chain - you may need to adjust this to match your setup
11-
ADDR=$(kubectl exec -i agoriclocal-genesis-0 -c validator -- agd keys add user1 | jq -r '.address')
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)