-
-
Notifications
You must be signed in to change notification settings - Fork 46
feat: mud plugin #1728
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
Open
0xpolarzero
wants to merge
51
commits into
05-21-init-mud-example
Choose a base branch
from
05-13-mud-plugin
base: 05-21-init-mud-example
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: mud plugin #1728
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
a45e6e6
init: mud package
0xpolarzero 2270b50
init: mud react example
0xpolarzero adb6375
init: mud react example in examples
0xpolarzero 427b343
init: copy sync-store components
0xpolarzero 6606480
init: mud react example (stash)
0xpolarzero 29fe40d
fix: txpool events
0xpolarzero bc5ba1a
Merge branch '05-15-fix-txpool-events' of github.com:0xpolarzero/tevm…
0xpolarzero 1ca8640
wip: @tevm/mud (missing getStorageAt overrides)
0xpolarzero 72d60fc
refactor: TxPool tests & minor fixes
0xpolarzero d80e2a7
test: vitest assert instead of !
0xpolarzero 630a732
Merge branch '05-15-fix-txpool-events' of github.com:0xpolarzero/tevm…
0xpolarzero 39fee8e
lint: TxPool & test
0xpolarzero f7d6d29
Merge branch '05-15-fix-txpool-events' of github.com:0xpolarzero/tevm…
0xpolarzero d04df31
lint: mud bundler-package
0xpolarzero 680c191
fix: wrong function call
0xpolarzero 6423a5b
fix: async function
0xpolarzero 372a1bd
Merge branch '05-21-fix-minehandler-skip-options' of github.com:0xpol…
0xpolarzero 0324206
wip: integration plan
0xpolarzero 1113633
wip: checkpoint
0xpolarzero 9ae9d6c
refactor: much cleaner starting point
0xpolarzero ee50eaf
refactor: cleaner getStorageAt
0xpolarzero 9af45eb
fix: types
0xpolarzero cb537d6
lint: handlers
0xpolarzero e9042e4
fix: race condition & incorrect memo deps
0xpolarzero 0bc361c
refactor: return txpoll events unsubscription
0xpolarzero 9b00111
refactor: tx status subscriptions
0xpolarzero e94b212
feat: explore static storage slots and fetch from mud store
0xpolarzero f3eb052
feat: full field layout decoding for all types (static, dynamic, enco…
0xpolarzero a5b06f3
feat: full working mud store slot exploration & encoding
0xpolarzero 439558e
fix: mud tests
0xpolarzero 1becc35
fix: react hooks
0xpolarzero e30814e
refactor: small adjustments
0xpolarzero 7bf5d92
test: all mud files
0xpolarzero 8218082
refactor: small cleanup
0xpolarzero 3356421
refactor: better organization & logs
0xpolarzero 4ea99d4
chore: remove unused package
0xpolarzero 8054f02
Merge branch '05-21-fix-minehandler-skip-options' of github.com:0xpol…
0xpolarzero 0d9f930
Merge branch '05-21-init-mud-example' of github.com:evmts/tevm-monore…
0xpolarzero 5929d52
Merge branch '05-21-init-mud-example' of github.com:evmts/tevm-monore…
0xpolarzero cd49f0b
fix: ethereumjs update
0xpolarzero a0d0bb7
refactor: make mud plugin work correctly (#1729)
0xpolarzero a9d68a2
Merge branch '05-21-init-mud-example' of github.com:evmts/tevm-monore…
0xpolarzero 20ce2df
test: fix viem error retricting version
0xpolarzero 97b6405
Merge branch '05-13-mud-plugin' of github.com:evmts/tevm-monorepo int…
0xpolarzero 930eab3
fix: review
0xpolarzero a30576d
test: better tests
0xpolarzero f8d6df3
Merge branch '05-21-init-mud-example' of github.com:evmts/tevm-monore…
0xpolarzero 29df1cb
chore: update lockfile (install w/ pnpm@10)
0xpolarzero bdd69da
test: fix todos
0xpolarzero 83743d2
fix: applyUpdates
0xpolarzero 2ee02e1
lint: mud extension
0xpolarzero 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 hidden or 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,4 @@ | ||
ignores: [ | ||
"@tevm/config" | ||
] | ||
skip-missing: true |
This file contains hidden or 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,50 @@ | ||
.env | ||
|
||
cache | ||
forge-artifacts | ||
broadcast | ||
types | ||
|
||
# compiled output | ||
dist | ||
packages/*/dist | ||
tmp | ||
/out-tsc | ||
**/tsconfig.tsbuildinfo | ||
|
||
# dependencies | ||
node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
**/lcov.info | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# My personal files | ||
.zshrc |
Empty file.
This file contains hidden or 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,22 @@ | ||
(The MIT License) | ||
|
||
Copyright 2020-2022 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains hidden or 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,3 @@ | ||
# @tevm/mud | ||
|
||
MUD plugin for optimistic updates with Tevm |
This file contains hidden or 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,77 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"files": { | ||
"ignore": [ | ||
".nx", | ||
"node_modules", | ||
"package.json", | ||
"**/package.json", | ||
"**/coverage", | ||
"**/node_modules", | ||
"**/dist", | ||
"**/types", | ||
"**/artifacts", | ||
"**/lib", | ||
"**/fixtures", | ||
"**/.next", | ||
"**/.vitepress/cache", | ||
"**/.vitepress/dist", | ||
"scaffold-tevm", | ||
"docs/**/*", | ||
"tevm/**/*", | ||
"bundler/**/*", | ||
".vscode", | ||
".changeset", | ||
".devcontainer", | ||
"examples/svelte-ethers/.svelte-kit", | ||
"examples/next", | ||
"bundler-packages/cli", | ||
"experimental/viem-effect", | ||
"bundler-packages/config/src/fixtures", | ||
"bundler-packages/cli/fixtures" | ||
] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "tab", | ||
"indentWidth": 2, | ||
"lineWidth": 120 | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"style": { | ||
"useImportType": "off" | ||
}, | ||
"performance": { | ||
"noDelete": "off", | ||
"noAccumulatingSpread": "off" | ||
}, | ||
"complexity": { | ||
"noForEach": "off", | ||
"noBannedTypes": "off", | ||
"useLiteralKeys": "off" | ||
}, | ||
"suspicious": { | ||
"noExplicitAny": "off", | ||
"noGlobalAssign": "off", | ||
"noArrayIndexKey": "off", | ||
"noConfusingVoidType": "off", | ||
"noAssignInExpressions": "off", | ||
"noRedeclare": "off" | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"trailingCommas": "all", | ||
"semicolons": "asNeeded" | ||
} | ||
} | ||
} |
This file contains hidden or 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,119 @@ | ||
{ | ||
"name": "@tevm/mud", | ||
"version": "1.0.0-next.142", | ||
"private": true, | ||
"description": "MUD plugin for optimistic updates with Tevm", | ||
"keywords": [ | ||
"solidity", | ||
"mud", | ||
"typescript", | ||
"web3", | ||
"blockchain" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/evmts/tevm-monorepo.git", | ||
"directory": "bundler-packages/mud" | ||
}, | ||
"license": "MIT", | ||
"contributors": [ | ||
"Will Cory <[email protected]>", | ||
"polarzero <[email protected]>" | ||
], | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": { | ||
"types": "./types/src/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
"./react": { | ||
"import": { | ||
"types": "./types/src/react/index.d.ts", | ||
"default": "./dist/react/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/react/index.d.cts", | ||
"default": "./dist/react/index.cjs" | ||
} | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "types/src/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"types", | ||
"src" | ||
], | ||
"scripts": { | ||
"lint:package": "bunx publint --strict && attw --pack", | ||
"test": "vitest --coverage", | ||
"test:coverage": "vitest run --coverage", | ||
"test:run": "vitest run", | ||
"test:ui": "vitest --ui", | ||
"all": "pnpm i && bun run build && bun run lint && bun run lint:check && bun run format:check && bun run format && bun run test:coverage && bun run generate:docs", | ||
"build": "nx run-many --targets=build:dist,build:types --projects=@tevm/mud", | ||
"build:dist": "tsup", | ||
"build:types": "tsup --dts-only && tsc --emitDeclarationOnly --declaration", | ||
"clean": "rm -rf node_modules && rm -rf artifacts && rm -rf dist && rm -rf cache", | ||
"format": "biome format . --write", | ||
"format:check": "biome format .", | ||
"generate:docs": "typedoc", | ||
"lint": "biome check . --write --unsafe", | ||
"lint:check": "biome check . --verbose", | ||
"lint:deps": "bunx depcheck" | ||
}, | ||
"dependencies": { | ||
"@latticexyz/common": "2.2.21", | ||
"@latticexyz/config": "^2.2.21", | ||
"@latticexyz/protocol-parser": "^2.2.21", | ||
"@latticexyz/schema-type": "^2.2.21", | ||
"@latticexyz/stash": "^2.2.21", | ||
"@latticexyz/store": "^2.2.21", | ||
"@latticexyz/store-sync": "^2.2.21", | ||
"@tevm/common": "workspace:^", | ||
"@tevm/logger": "workspace:^", | ||
"@tevm/memory-client": "workspace:^", | ||
"@tevm/txpool": "workspace:^", | ||
"@tevm/utils": "workspace:^", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"viem": "^2.23.10" | ||
}, | ||
"devDependencies": { | ||
"@testing-library/react": "^16.2.0", | ||
"@tevm/config": "workspace:^", | ||
"@tevm/decorators": "workspace:^", | ||
"@tevm/node": "workspace:^", | ||
"@tevm/test-utils": "workspace:^", | ||
"@tevm/tsconfig": "workspace:^", | ||
"@tevm/tsupconfig": "workspace:^", | ||
"@types/react": "^18.2.0", | ||
"@types/react-dom": "^18.2.0", | ||
"jsdom": "^26.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"viem": "^2.23.10" | ||
}, | ||
"peerDependenciesMeta": { | ||
"react": { | ||
"optional": true | ||
}, | ||
"react-dom": { | ||
"optional": true | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.
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.
Why is this in bundler-packages instead of packages?
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.
I thought everything inside
packages
was related to the evm. Sawwhatsabi
inbundler-packages
so just copied that. Maybe we can move right before merging to not break comments?