Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ds-cli: applying ItemKind and BuildingKind manifests #504

Merged
merged 32 commits into from Aug 8, 2023
Merged

Conversation

chrisfarms
Copy link
Contributor

@chrisfarms chrisfarms commented Aug 7, 2023

what

  • adds ability to apply BuildingKind and ItemKind extensions via YAML manifests
  • notify when a cli update is available
  • rejig the query commands a bit to make it simpler to maintain (see ds get --help)
  • --> ds get items
  • --> ds get units ...etc
  • allow exporting solidity remappings via ds config get-remappings > remappings.txt - this is a quick way to keep tools like solc / vscode / forge happy with the magic @ds solidity import
  • resolves: cli tool to help builders deploy extensions #108

example deploying a BuildingKind + Item

There is a couple of example manifests in ./cli/test/examples/ which can have a look at and apply via

# install the cli tool to get latest
npm install -g @playmint/ds-cli

# navigate to repo
cd /path/to/ds

# look at the examples
ls ./cli/test/examples/

# apply a specific extension config 
ds apply -f ./cli/test/examples/manifest.yaml

# recursive apply ALL manifests in a dir and subdirs (useful if you have lots of manifests)
ds apply -R -f .

known issues

first pass at using solc-js + DEPLOY_KIND_IMPLEMENTATION action to allow
deploying building kind implementation contract from ds-cli via a game
action

we want this so we can allow people to deploy via the sequencer without
needing a seperate token and using their player account

at this stage there are assumptions being made about project structure
still being forge-shaped and you need to pass a ton of cli args ... but
this gets the basics in place
it takes alot of cli args to deploy a building and this isn't very
repeatable ... to address this we add a declarative "manifest" for
describing deployment of ItemKind and BuildingKind enabling deploying
multiple preconfigured things in one go.

sometimes you don't know the id of an item before you have deployed it,
to address this you can reference a not-yet-deployed item by name, so
long as the name references another kind from the same manifest
allows for an easy way to get external compiler / tooling working for
anything that supports the remappings.txt format (solc, vscode, forge)
@chrisfarms chrisfarms merged commit 200b2e9 into main Aug 8, 2023
3 checks passed
@chrisfarms chrisfarms deleted the cli-deploy branch August 8, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli tool to help builders deploy extensions
2 participants