-
Notifications
You must be signed in to change notification settings - Fork 203
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
feat(cli): declarative deployment #1702
Merged
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
310b30b
add sendTransaction helper
holic e815a7a
start new deploy command with deployment proxy
holic 68fcad3
deterministic world factory
holic f7ff52d
deploy world
holic 72c893b
register tables
holic 52394a3
this is no longer the case with resource types
holic e79e718
register systems
holic dff6637
improve logs
holic 9df0429
rename create2 dir
holic 681e2af
get world deploy and resource IDs
holic f26472c
refactor world deploy handling
holic cf60adb
clarify resourceId (hex) from resource (object)
holic 3aef65e
wip
holic bcb3cbd
resolve custom types
holic f374af9
upgrade systems
holic 43949a6
register system functions
holic 5a897fb
wip system functions
holic 29e0506
small clean up
holic 862eb42
register functions
holic ba64b40
grant/revoke access
holic d017e9f
install modules
holic 2e3d242
install modules
holic 2e952b4
make sure to pass toBlock into getters
holic e2d0052
Merge remote-tracking branch 'origin/main' into holic/declarative-dep…
holic bfe7ec6
revert example change
holic 4abb58f
migrate deploy command
holic bc5b45e
replace deploy, test, dev-contracts with new deploy internals
holic f271c13
more clean up
holic 2d4b602
Merge remote-tracking branch 'origin/main' into holic/declarative-dep…
holic bdcce1d
revert as const for now, remove invalid test
holic edf84df
only run postdeploy for fresh worlds
holic 839e665
opts -> options
holic 3fce375
remove comment
holic 9c6f04f
bump debounce time, add comment
holic d0fe353
Merge remote-tracking branch 'origin/main' into holic/declarative-dep…
holic 71a106d
use hello events from store/world
holic 8d1acd5
clarify comment
holic ad4efd8
add store/world version check
holic ac664d1
assert namespace owner
holic 130d661
update comment
holic c11956b
rename to/from block
holic 96f9769
update comments
holic f0ce45d
consistency
holic bed3180
clarify vars
holic 6d385fb
Update packages/cli/src/deploy/resolveConfig.ts
holic 7028e31
Update packages/cli/src/runDeploy.ts
holic 534eb96
Update packages/cli/src/runDeploy.ts
holic 9c35a5a
Update packages/cli/src/deploy/deploy.ts
holic 745b883
fix/remove TODOs
holic 9419c02
fix test data script, update test data
holic 6d28203
fix e2e
holic 5857688
fix user types internal type
holic 37fd725
update snapshots
holic bc2c714
no longer a constraint
holic 5c3b409
Create wicked-pens-promise.md
holic 4c7e7ff
Create poor-bags-stare.md
holic 1791c65
Update poor-bags-stare.md
holic 360009d
simplify function sig usage, remove unused utils
holic 339ffd1
Update poor-bags-stare.md
holic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,14 @@ | ||
--- | ||
"@latticexyz/cli": major | ||
--- | ||
|
||
`deploy`, `test`, `dev-contracts` were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc. | ||
|
||
The following CLI arguments are now removed from these commands: | ||
|
||
- `--debug` (you can now adjust CLI output with `DEBUG` environment variable, e.g. `DEBUG=mud:*`) | ||
- `--priorityFeeMultiplier` (now calculated automatically) | ||
- `--disableTxWait` (everything is now parallelized with smarter nonce management) | ||
- `--pollInterval` (we now lean on viem defaults and we don't wait/poll until the very end of the deploy) | ||
|
||
Most deployment-in-progress logs are now behind a [debug](https://github.com/debug-js/debug) flag, which you can enable with a `DEBUG=mud:*` environment variable. |
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,5 @@ | ||
--- | ||
"@latticexyz/world": patch | ||
--- | ||
|
||
With [resource types in resource IDs](https://github.com/latticexyz/mud/pull/1544), the World config no longer requires table and system names to be unique. |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"31337": { | ||
"address": "0x0355B7B8cb128fA5692729Ab3AAa199C1753f726" | ||
"address": "0x97e55ad21ee5456964460c5465eac35861d2e797" | ||
} | ||
} |
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens currently if there is an error during the deploy? would the dev process stop or just wait until the next change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right now things just explode and the process dies (~fine)
I tried to wrap in a try/catch but still got weird behavior
ideally things would re-run once files change, regardless of error, but didn't wanna rabbit hole too long on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if i'm not mistaken that was the previous behavior (e.g. if there is a typo in a contract the dev runner logged the error but kept watching to rerun when the typo was fixed). I'm fine with not blocking this PR on this, but think we should do it in a followup soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a follow up issue here: #1731