Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

feat: include contract; yarn start:docker etc. #2

Merged
merged 12 commits into from
Nov 10, 2023
Merged

Conversation

dckc
Copy link
Collaborator

@dckc dckc commented Nov 2, 2023

Goal here is to get all the parts from the simple game dapp that we used in the Nov 1 office hours demo in this one repo.

See also:

I have all the parts working, but I'm struggling to get them all working at the same time.

Stay tuned for

  • asciinema recording of a clean build
  • git history clean-up
  • integrate update of docker image that has the walletFactory / smart wallet NFT upgrade (11wf)
# prereqs: node, yarn, docker-compose

yarn  # UI deps

yarn build:contract
yarn build:proposal

# local chain using docker-compose

yarn start:docker
yarn docker:logs

# need a few 1000 IST to pay for contract bundle installation

yarn make:help
yarn docker:make balance-q
yarn docker:make mint4k
yarn docker:make balance-q

yarn docker:bash
agd query vstorage children published.priceFeed

cc @samsiegart @0xpatrickdev @sufyaankhan @kbennett2000

@dckc
Copy link
Collaborator Author

dckc commented Nov 2, 2023

View the recording at:

@dckc dckc marked this pull request as ready for review November 3, 2023 16:55
@dckc dckc marked this pull request as draft November 3, 2023 16:57
@dckc dckc self-assigned this Nov 4, 2023
 - start:docker, docker:logs, docker:bash, docker:make, docker:help
 - agd cheat-sheet in the form of a Makefile
@dckc dckc marked this pull request as ready for review November 8, 2023 00:41
@dckc
Copy link
Collaborator Author

dckc commented Nov 8, 2023

@samsiegart @0xpatrickdev any chance you can reproduce my results and approve?

There are still some rough edges, but I'm reaching a point of diminishing returns with the polishing.

@dckc
Copy link
Collaborator Author

dckc commented Nov 8, 2023

p.s. dc-test-contract 1a653c0 is an attempt to add contract testing with yarn test but I hit all sorts of trouble. Evidently agoric init and agoric install really are necessary; we're further than I thought from using the SDK from npm just by adding dependencies to a project like this: Agoric/agoric-sdk#3857 (comment)

Copy link

@0xpatrickdev 0xpatrickdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only dug in lightly, but things are working for me outside of the 2 comments I made. Exciting!

#2 (comment)
#2 (comment)

@samsiegart
Copy link

  • Point of confusion: yarn build:proposal spits out a suggested agd command, do I have to run that afterward?
  • Ran into the same issue with apple silicon, @0xpatrickdev's suggestion got me past that
  • yarn make:help output a little confusing:
samuelsiegart@Samuels-MacBook-Pro dapp-join-game % yarn make:help

yarn run v1.22.19
$ make -C contract list
make -npq : 2> /dev/null | \
		awk -v RS= -F: '$1 ~ /^[^#%]+$/ { print $1 }'
instance-q
.PHONY
mint4k
fund-acct
vote
balance-q
list
gov-q
✨  Done in 0.09s.
  • Made it the rest of the way through, saw some IST in my balance and the price feeds showed up on the last step 🎉 (I should've timed it, but I don't think it took more than 10 minutes to set everything up)
  • Is this all? Should I try starting the UI and making an offer?

@dckc
Copy link
Collaborator Author

dckc commented Nov 9, 2023

Should I try starting the UI and making an offer?

yes, please do, @samsiegart

> Docker Desktop for Mac with Apple Silicon can automatically emulate amd64 architecture on ARM64. When you try to run an image that is not available for ARM64, Docker Desktop uses Rosetta 2 to emulate an AMD64 CPU.

Co-authored-by: 0xPatrick <[email protected]>
@dckc
Copy link
Collaborator Author

dckc commented Nov 9, 2023

Point of confusion: yarn build:proposal spits out a suggested agd command, do I have to run that afterward?

Either that or something analogous. My current thinking is to have folks use the gov proposal builder UI, so I agree that's mostly a distraction.

yarn make:help output a little confusing

It's supposed to be a list of things you can do with yarn docker:make. But yeah... it's clear-as-mud in its present form.

@dckc
Copy link
Collaborator Author

dckc commented Nov 10, 2023

@0xpatrickdev , @samsiegart thanks for the feedback.

I integrated the mac docker thing and clarified make:help:

~/projects/simple-game$ yarn make:help
yarn run v1.22.19
$ echo 'USAGE: yarn docker:make TARGET
where TARGET is one of...'; cd contract; make list
USAGE: yarn docker:make TARGET
where TARGET is one of...
instance-q
vote
balance-q
mint4k
gov-q
list
fund-acct
Done in 0.04s.

I also updated the README.

PTAL.

@dckc dckc changed the base branch from ses-fix to main November 10, 2023 00:21
@dckc dckc merged commit 133e4b1 into main Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants