This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
forked from samsiegart/simple-game
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: npm scripts to run local chaing with docker
- start:docker, docker:logs, docker:bash, docker:make, docker:help - agd cheat-sheet in the form of a Makefile
- Loading branch information
Showing
4 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
CHAINID=agoriclocal | ||
USER1ADDR=$(shell agd keys show user1 -a --keyring-backend="test") | ||
ACCT_ADDR=$(USER1ADDR) | ||
BLD=000000ubld | ||
|
||
.PHONY: list | ||
# https://stackoverflow.com/a/73159833/7963 | ||
list: | ||
make -npq : 2> /dev/null | \ | ||
awk -v RS= -F: '$$1 ~ /^[^#%]+$$/ { print $$1 }' | ||
|
||
balance-q: | ||
agd keys show user1 -a --keyring-backend="test" | ||
agd query bank balances $(ACCT_ADDR) | ||
|
||
GAS_ADJUSTMENT=1.2 | ||
SIGN_BROADCAST_OPTS=--keyring-backend=test --chain-id=$(CHAINID) \ | ||
--gas=auto --gas-adjustment=$(GAS_ADJUSTMENT) \ | ||
--yes -b block | ||
|
||
mint4k: | ||
make FUNDS=1000$(ATOM) fund-acct | ||
agops vaults open --wantMinted 4000 --giveCollateral 1000 >/tmp/want4k.json | ||
agops perf satisfaction --executeOffer /tmp/want4k.json --from user1 --keyring-backend=test | ||
|
||
FUNDS=321$(BLD) | ||
fund-acct: | ||
agd tx bank send validator $(ACCT_ADDR) $(FUNDS) \ | ||
$(SIGN_BROADCAST_OPTS) \ | ||
-o json >,tx.json | ||
jq '{code: .code, height: .height}' ,tx.json | ||
|
||
gov-q: | ||
agd query gov proposals --output json | \ | ||
jq -c '.proposals[] | [.proposal_id,.voting_end_time,.status]' | ||
|
||
PROPOSAL=1 | ||
VOTE_OPTION=yes | ||
vote: | ||
agd tx gov vote $(PROPOSAL) $(VOTE_OPTION) --from=validator \ | ||
$(SIGN_BROADCAST_OPTS) \ | ||
-o json >,tx.json | ||
jq '{code: .code, height: .height}' ,tx.json | ||
|
||
instance-q: | ||
agd query vstorage data published.agoricNames.instance -o json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3.5' | ||
|
||
services: | ||
agd: | ||
# image publication is WIP | ||
# cf. https://github.com/Agoric/agoric-3-proposals/issues/6 | ||
image: ghcr.io/agoric/agoric-3-proposals:main | ||
ports: | ||
- 26656:26656 | ||
- 26657:26657 | ||
- 1317:1317 | ||
environment: | ||
DEST: 1 | ||
DEBUG: "SwingSet:ls,SwingSet:vat" | ||
volumes: | ||
- .:/workspace | ||
entrypoint: /usr/src/upgrade-test-scripts/start_agd.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters