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

fix(cli): fix deployer warning #2683

Merged
merged 3 commits into from
Apr 17, 2024
Merged

fix(cli): fix deployer warning #2683

merged 3 commits into from
Apr 17, 2024

Conversation

holic
Copy link
Member

@holic holic commented Apr 17, 2024

fixes this warning:

  mud:cli:deploy found CREATE2 deployer at 0x4e59b44847b379578588920ca78fbf26c0b4956c +0ms

  ⚠️ Bytecode for deployer at 0x4e59b44847b379578588920ca78fbf26c0b4956c did not match the expected CREATE2 bytecode. You may have unexpected results.

(I didn't realize that the bytecode in the deployer repo was the creation code, not the onchain bytecode)

Copy link

changeset-bot bot commented Apr 17, 2024

🦋 Changeset detected

Latest commit: 1abbb71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@latticexyz/cli Patch
mock-game-contracts Patch
@latticexyz/abi-ts Patch
@latticexyz/block-logs-stream Patch
@latticexyz/common Patch
@latticexyz/config Patch
create-mud Patch
@latticexyz/dev-tools Patch
@latticexyz/faucet Patch
@latticexyz/gas-report Patch
@latticexyz/protocol-parser Patch
@latticexyz/query Patch
@latticexyz/react Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/utils Patch
@latticexyz/world-modules Patch
@latticexyz/world Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holic holic marked this pull request as ready for review April 17, 2024 18:22
@holic holic requested review from alvrs and yonadaa as code owners April 17, 2024 18:22

export async function ensureDeployer(client: Client<Transport, Chain | undefined, Account>): Promise<Address> {
const bytecode = await getBytecode(client, { address: deployer });
if (bytecode) {
debug("found CREATE2 deployer at", deployer);
if (bytecode !== deployerBytecode) {
if (bytecode !== sliceHex(`0x${deployment.creationCode}`, 14)) {
Copy link
Member

Choose a reason for hiding this comment

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

what's the 14?

Copy link
Member Author

@holic holic Apr 17, 2024

Choose a reason for hiding this comment

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

basically the opcodes to create the contract + constructor stuff

image

@alvrs alvrs merged commit 632a752 into main Apr 17, 2024
11 of 12 checks passed
@alvrs alvrs deleted the holic/fix-deployer-warning branch April 17, 2024 19:07
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.

2 participants